-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitconfig
126 lines (126 loc) · 3.35 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
[user]
email = [email protected]
name = LboAnn
[color]
ui = true
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[color "diff"]
meta = yellow
frag = magenta bold
commit = yellow bold
old = red bold
new = green bold
whitespace = red reverse
#[color "branch"] current, local, remote... are configurable
[alias]
ad = add --all .
asp= add -P
br = branch
bl = blame
chp = cherry-pick
chpa = cherry-pick --abort
chpc = cherry-pick --continue
ci = commit -v
cia = commit -v --amend
cian = commit -v --amend --no-edit
cim = commit -m
# Sign commit to avoid iden fake commit
cis = commit -v -S
cias = commit -v --amend -S
cians = commit -v --amend --no-edit -S
cims = commit -m -S
c = clone --recursive
cl = clone
cl1 = clone --depth 1
co = checkout
cob = checkout -b
cn = clean -df
df = diff
dfc = diff --cached
dfw = diff -w
dfcw = diff --cached -w
dfs = diff --stat --summary
fh = fetch
fhu = fetch upstream
mg = merge
mgf = merge --ff
mgnf= merge --no-ff
rb = rebase
rba = rebase --abort
rbc = rebase --continue
rbi = rebase -i
rbm = rebase master
ref = reflog
rmt = remote
rmtv = remote -v
rmta = remote add
rmtau = remote add upstream
rs = reset
rst = reset
rsh = reset --hard
rv = revert
rvt = revert
pl = pull
plr = pull --rebase
plom= pull origin master
pom =pull origin master:master --rebase
ps = push
psf= push -f
sh = stash
shp= stash pop
sm = submodule
st = status
s = status -s
lg = log
lgp = log -p
lgpw = log -p -w
lgs = log --stat --summary
lgt = log --abbrev-commit --decorate --graph --color --pretty='format:%C(yellow)%h%Creset% s %C(magenta)%an%Creset %C(green)%ar%Creset'
lgtn = log -5 --abbrev-commit --decorate --graph --color --pretty='format:%C(yellow)%h%Creset% s %C(magenta)%an%Creset %C(green)%ar%Creset'
lgf = log --follow
lgpf = log -p --follow
lgpwf = log -p -w --follow
lgsf = log --stat --summary --follow
lgtf = log --abbrev-commit --decorate --graph --color --pretty='format:%C(yellow)%h%Creset% s %C(magenta)%an%Creset %C(green)%ar%Creset' --follow
lgsh = log --abbrev-commit --graph --color --pretty='format:%C(yellow)%h%Creset% s %C(magenta)%an%Creset %C(green)%ar%Creset' --grep
pushall = "!fn(){ for a in `git remote`; do git push $a $(git rev-parse --abbrev-ref HEAD); done; };fn"
pullall = "!fn(){ for a in `git remote`; do git pull $a $(git rev-parse --abbrev-ref HEAD); done; };fn"
fetchall = "!fn(){ for a in `git remote`; do git fetch $a; done; };fn"
fetchmulti = "!fn(){ for a in $@; do git fetch $a; done; };fn"
fetchpr = "!fn(){ for a in $@; do git fetch g-origin pull/$a/head:$a -f; done; };fn"
[push]
# for only push to current branch
default = tracking
[core]
editor = vim
excludesfile = ~/.gitignore_global
pager = "diff-so-fancy | less --tabs=2 -RFX"
preloadindex = true
ignorecase = false
fscache = true
quotepath = false # for chinese in git status
[mergetool]
keepBackup = false
[gui]
encoding = utf-8
[i18n]
commitencoding = utf-8
logoutputencoding = utf-8
[help]
autocorrect = 10
[credential]
helper = cache --timeout=600
[branch "master"]
rebase = true
[branch "dev"]
rebase = true
[branch]
autosetuprebase = always
[grep]
lineNumber = true
[diff]
compactionHeuristic = true