-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitconfig
186 lines (145 loc) · 4.37 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
[diff "visual"]
command = "git-wrapper-visual-diff"
[am]
threeWay = true
[core]
abbrev = 12
[color]
ui = auto
[commit]
verbose = 1
[log]
date = format:%a %Y-%m-%d %H:%M:%S
[pretty]
fixes = Fixes: %h (%ad, \"%s\")
ref = commit %h (%ad, %an: \"%s\")
shortref = commit %h (\"%s\")
[alias]
b4 = "!f() { b4 am -l -t -o - $1 | git am -s; }; f"
st = status
br = branch
fopa = format-patch --notes --indent-heuristic --no-renames -N --no-signature --summary --stat=80
bi = bisect
sub = submodule
# amq: see ~/bin/git-amq
f = fetch
pu = push
pull = pull --no-stat
pur = pull --no-stat --rebase
puf = push --force-with-lease
a = add -p
chp = cherry-pick
chpc = cherry-pick --continue
ci = commit
cia = commit --all
ciam = commit --all -m.
cis = commit --signoff
cisa = commit --signoff --all
amend = commit --amend
fix = commit --fixup
sq = commit --squash
d = diff
di = diff
dif = diff
ca = diff --cached
cached = diff --cached
full = show --pretty=fuller
stat = show --stat=100000 --stat-graph-width=40
fullstat = show --stat=100000 --stat-graph-width=40
fulldiff = diff -p --no-prefix -U20000
# use 'git set-default-branch refs/heads/origin/master' or similiar
set-default-branch = symbolic-ref refs/heads/DEFAULT_BRANCH
rdd = !"f() { git range-diff refs/heads/DEFAULT_BRANCH ${1:-'@{u}'} ${2:-HEAD}; }; f"
ld = graph --boundary refs/heads/DEFAULT_BRANCH...@ refs/heads/DEFAULT_BRANCH...@{u}
co = checkout
cop = checkout -p
rep = reset -p
hard = reset --hard
rehead = reset HEAD
reco = !sh -c 'git reset HEAD && git checkout .'
redo = !sh -c 'git reset --soft $(git merge-base master HEAD)'
pop = stash pop
stp = stash pop
sts = stash save
sl = log --oneline --no-decorate
ol = log --format='%C(auto)%h %C(blue)%ad %C(green)(%an) %C(reset)%s'
lastlog = log --graph HEAD@{1}..HEAD --format='%C(auto)%h %C(blue)%ad %C(green)(%an) %C(reset)%s'
fetchlog = log --graph HEAD..FETCH_HEAD --format='%C(auto)%h %C(blue)%ad %C(green)(%an) %C(reset)%s'
graph = log --graph --pretty='%C(auto)%h%d %C(blue)%ad %C(green)(%an)%C(reset) %s' --abbrev-commit
g = graph '@{u}^..@'
gr = graph
gra = graph --branches --tags --remotes
fixes = show --no-patch --no-notes --date="format:%Y-%m-%d" --pretty=fixes --abbrev=20
urlref= !sh -c "'git ref \"$@\"; echo; git url \"$@\"'" -- # "URL reference"
url = show --no-patch --no-notes --pretty=url --abbrev=20 # uses pretty.url from repo's .git/config
ref = show --no-patch --no-notes --date="format:%Y-%m-%d" --pretty=ref --abbrev=20 # "reference format"
cite = !sh -c "'git longref \"$@\"; echo; git url \"$@\"'" -- # "full reference/citation format"
longref = show --no-patch --no-notes # "long reference format"
shortref = show --no-patch --no-notes --pretty=shortref --abbrev=20 # "short reference format'
rb = rebase
rbi = rebase -i
rbin = rebase -i --no-autosquash
rbc = rebase --continue
rbd = rebase -i refs/heads/DEFAULT_BRANCH
im = imerge merge
imc = imerge continue
imr = imerge rebase
assume-unchanged = update-index --assume-unchanged
no-assume-unchanged = update-index --no-assume-unchanged
really-status = update-index --really-refresh
svr = svn rebase
svd = svn dcommit
sv = !sh -c 'git svn rebase && git svn dcommit'
noa = notes add -m
[core]
excludesfile = ~/.gitrc/ignore
[cola]
fontdiff = Terminus,8,-1,5,50,0,0,0,0,0
tabwidth = 4
spellcheck = false
[gui]
editor = vi
historybrowser = gitk
[pager]
log = diff-highlight | less
show = diff-highlight | less
diff = diff-highlight | less
[diff]
tool = meld
compactionHeuristic = true # git 2.9
[merge]
tool = meld
defaultToUpstream = true
[pull]
ff = only
[push]
default = simple
[rebase]
autoSquash = true
autoStash = true
missingCommitsCheck = warn
instructionFormat = %ai [%<(18,trunc)%an]%d %s
[achievement]
upload = false
[bash]
showDirtyState = true
[remote-hg]
hg-git-compat = true
[init]
templatedir = ~/.gitrc/init-template/
defaultBranch = main
[submodule]
fetchJobs = 4 # git 2.9
[fetch]
recurseSubmodules = false
[sendemail]
confirm = always
envelopesender = auto
assume8bitEncoding = utf8
composeencoding = utf8
transferEncoding = auto
[stash]
showPatch = true
showStat = true
[notes]
rewriteRef = refs/notes/commits