-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
52 lines (48 loc) · 1.57 KB
/
.gitconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
[user]
name = Leyan Lo
email = [email protected]
[branch]
autosetuprebase = always
[diff]
[color]
ui = auto
[alias]
s = status
co = checkout
cp = cherry-pick
fa = fetch --all
unstage = reset HEAD --
# Fancy logging.
# h = head
# r = recent commits, only current branch
# ra = recent commits, all reachable refs
# l = all commits, only current branch
# la = all commits, all reachable refs
# b = local branches
# bs = local branches, sorted by last commit date
# ba = all branches,
# bas = all branches, sorted by last commit date
head = !git r -1
h = !git head
r = !GIT_NO_PAGER=1 git l -30
ra = !git r --all
l = "!. ~/.githelpers && pretty_git_log"
la = !git l --all
b = "!. ~/.githelpers && pretty_git_branch"
bs = "!. ~/.githelpers && pretty_git_branch_sorted"
ba = !git b --all
bas = !git bs --all
# Native log aliases, which can accept double-dash params, e.g. git ll -- path/to/folder
hh = rr -1
rr = ll -30
rra = rr --all
ll = log --graph --pretty=format:'%C(yellow)%h%C(reset) %C(green)(%ar)%C(reset) %C(blue)<%an>%C(reset)%C(red)%d%C(reset) %s' --decorate=short --decorate-refs-exclude="tags/phabricator/*"
lla = ll --all
# Start repo with empty commit
start = !git init && git commit --allow-empty -m \"chore: initial commit\"
# Delete all branches already merged into the current branch
cleanup = !git branch --merged | grep -v \"*\" | xargs -n 1 git branch -d
[push]
default = simple
[init]
defaultBranch = main