forked from LukeSmithxyz/voidrice
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitconfig
350 lines (290 loc) Β· 10.5 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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
########################################################################\
# #
# #
# #
# _______________________________________________ #
# /\ \ #
# \_| _ _ __ _ | #
# | __ _(_) |_ ___ ___ _ __ / _(_) __ _ | #
# | / _` | | __| / __/ _ \| '_ \| |_| |/ _` | | #
# | | (_| | | |_ | (_| (_) | | | | _| | (_| | | #
# | \__, |_|\__| \___\___/|_| |_|_| |_|\__, | | #
# | |___/ |___/ | #
# | | #
# | https://github.com/kiprasmel/voidrice | #
# | | #
# | __________________________________________|_ #
# \_/____________________________________________/ #
# #
# #
# #
########################################################################/
[init]
defaultBranch = master
[user]
name = Kipras Melnikovas
email = [email protected]
# signingkey is $GPG_SIGNING_KEY
[core]
# editor is $EDITOR
# pager is $GIT_PAGER
autocrlf = input
safecrlf = warn
logAllRefUpdates = true
[advice]
statusHints = false # clean git status output
detachedHead = false
addIgnoredFile = false
[rerere]
enabled = true
[imap]
host = mail.kipras.org
user = [email protected]
port = 993
folder = Drafts
[sendemail]
confirm = always
smtpEncryption = tls
smtpServer = mail.kipras.org
smtpUser = kipras
smtpServerPort = 587
[format]
signoff = true
[stash]
showIncludeUntracked = true
[gpg]
program = gpg2
[commit]
verbose = true
gpgSign = true
[merge]
ff = no # rebase + merge commit
conflictStyle = zdiff3
tool = nvimdiff
[mergetool]
writeToTemp = true
keepBackup = true
[mergetool "vimdiff"]
layout = LOCAL,BASE,REMOTE / MERGED + BASE,LOCAL + BASE,REMOTE + (LOCAL/BASE/REMOTE),MERGED
trustExitCode = true
[absorb]
# https://github.com/tummychow/git-absorb
maxStack = 100
oneFixupPerCommit = true
fixupTargetAlwaysSHA = true
autoStageIfNothingStaged = true
[addfiles]
# https://github.com/kiprasmel/git-add-files
#noInfoComment = true
[stackedrebase]
# https://github.com/kiprasmel/git-stacked-rebase
#autoApplyIfNeeded = true
[rebase]
stat = true
autoSquash = true
#autoStash = true # you cannot access it from the stash which sucks
updateRefs = true
abbreviateCommands = false # vim's `ce` cuts the commit sha so nope
missingCommitsCheck = error
[pull]
rebase = true # https://git-scm.com/docs/git-config#Documentation/git-config.txt-pullrebase
ff = yes
[push]
followTags = true
#autoSetupRemote = true # git pp instead
[fetch]
parallel = 0 # parallel >1
[submodule]
fetchJobs = 0 # parallel >1
[checkout]
workers = 0 # parallel max
[hub]
protocol = ssh
[help]
autoCorrect = 0
[diff]
algorithm = patience
#algorithm = histogram
#colorMoved = "zebra"
#colorMovedWS = "allow-indentation-change"
[grep]
lineNumber = true
patternType = perl
[alias]
a = add
# ad* => add "dot" (cwd)
# ag* => add "global" (repo root)
ad = !git add ${GIT_PREFIX:-.} # refers to the **current** directory of the repo ([d]ot)
ag = !git add . # refers to the **root** directory of the repo ([g]lobal)
adc = !git add ${GIT_PREFIX:-.} && git c
agc = !git add . && git c
adct = !git add ${GIT_PREFIX:-.} && git ct
agct = !git add . && git ct
adcm = !git add ${GIT_PREFIX:-.} && git cm
agcm = !git add . && git cm
adca = !git add ${GIT_PREFIX:-.} && git ca
agca = !git add . && git ca
adcaw = !git add ${GIT_PREFIX:-.} && git ca --no-edit
agcaw = !git add . && git ca --no-edit
adcawpf = !git add ${GIT_PREFIX:-.} && git ca --no-edit && git push -f
agcawpf = !git add . && git ca --no-edit && git push -f
adcawpfn = !git add ${GIT_PREFIX:-.} && git ca --no-edit --no-verify && git push -f --no-verify
agcawpfn = !git add . && git ca --no-edit --no-verify && git push -f --no-verify
adcf = "!git add ${GIT_PREFIX:-.} && git cf $* #"
agcf = "!git add . && git cf $* #"
adcfr = "!git add ${GIT_PREFIX:-.} && git cf \"$1\" && git rebase -i \"$(git fixup-target)~\" #"
agcfr = "!git add . && git cf \"$1\" && git rebase -i \"$(git fixup-target)~\" #"
adcfrw = "!git add ${GIT_PREFIX:-.} && git cf \"$1\" && EDITOR=true git rebase -i \"$(git fixup-target)~\" #"
agcfrw = "!git add . && git cf \"$1\" && EDITOR=true git rebase -i \"$(git fixup-target)~\" #"
adctpf = !git add ${GIT_PREFIX:-.} && git c -m "TEMP" --no-verify && git push -f --no-verify
agctpf = !git add . && git c -m "TEMP" --no-verify && git push -f --no-verify
ap = add --patch
adp = !git add --patch ${GIT_PREFIX:-.}
agp = !git add --patch .
ae = add --edit
ade = !git add --edit ${GIT_PREFIX:-.}
age = !git add --edit .
af = add-files # https://github.com/kiprasmel/git-add-files
at = git-at # https://github.com/kiprasmel/git-at
# https://github.com/tummychow/git-absorb
ab = absorb
abr = absorb -r
b = branch
ba = branch --all
bt = branch --track
sob = branch --show-current
sod = !git diff "origin"/"$(git sob)" $*
sodp = !git diff "origin"/"$(git parent)" "$(git parent)" $*
bp = backup
#backup = backup # github.com/kiprasmel/dotfiles/.local/bin/tools/git-backup
#behind = behind # github.com/kiprasmel/dotfiles/.local/bin/tools/git-behind
#behind-remote = behind-remote # github.com/kiprasmel/dotfiles/.local/bin/statusbar/git-behind-remote
c = commit
cm = commit-msg
ct = commit-msg TEMP
ca = c --amend
caw = c --amend --no-edit
cawpf = !git c --amend --no-edit && git push -f
cawpfn = !git c --amend --no-edit && git push -f --no-verify
cf = "!git show \"$1\" --format=oneline --no-patch && git c --message=\"fixup! $(git rev-parse \"$1\")\" #"
fr = "!git stash -u && git rebase -i \"$(git fixup-target)~\" && git stash pop #"
cfr = "!git cf \"$1\" && git fr"
fixup-target = "!git show \"@\" --pretty='format:%s' -q | cut -d' ' -f2"
co = checkout
cob = checkout -b
com = checkout master
cfg = config --global --edit
# cd needed in case inside git repo:
# without it would place cloned repo in repo root dir.
cl = "!cd \"${GIT_PREFIX:-.}\" && git clone $* || hub clone $* #"
clf = "!cd \"${GIT_PREFIX:-.}\" git clone --filter=blob:none --no-checkout $* || hub clone --filter=blob:none --no-checkout $*"
create = !hub create
d = diff
dd = !git diff ${GIT_PREFIX:-.}
dg = !git diff .
ds = diff --staged
dds = !git diff --staged ${GIT_PREFIX:-.}
dst = !git diff --stat
df = diff FETCH_HEAD
da = diff AUTO_MERGE
dm = diff AUTO_MERGE
d3 = diff3c # http://github.com/kiprasmel/git-diff3c
e = exec
exec = "!exec "
f = fetch
fa = fetch --all
farom = !git fa && git rom
fariom = !git fa && git riom
fariomw = !git fa && git riomw
fd = fetch --unshallow # deep
#g =
#hop = hop # https://github.com/kiprasmel/voidrice/blob/master/.local/bin/git-hop
# cope https://github.com/git/git/commit/936d2c9301e41a84a374b98f92777e00d321a2ea
ignore = update-index --assume-unchanged
#j =
#k =
# man git-log, "--format", "PRETTY FORMATS"
l = lg
ls = lg --stat
lo = log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
lgg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset %G?' --abbrev-commit
lgs = ls
lgp = lg --patch
lp = log --patch
lpf = lp --follow
lf = !git log -L":$1:$2" # log function in file
#m = merge
mt = mergetool
#n =
o = browse # https://github.com/tj/git-extras/blob/main/bin/git-browse
p = push --follow-tags
pl = pull
pf = push --force-with-lease --force-if-includes
pp = "!git push --set-upstream \"${1:-origin}\" \"${2:-HEAD}\""
ppf = "!git push --set-upstream \"${1:-origin}\" \"${2:-HEAD}\" --force-with-lease --force-if-includes"
ppff = "!git push --set-upstream \"${1:-origin}\" \"${2:-HEAD}\" --force"
pa = patch
patch = !GIT_PAGER='' git diff -u
# https://github.com/kiprasmel/voidrice/tree/master/.local/bin/git-pad
# "patch delta"
#pad = pad # stats (+, -, Β±) from ref to HEAD + uncommited changes
pado = !git pad ${1:-@} # stats (+, -, Β±) of *only* the ref
padom = !git pad origin/master..${1:-@}
padd = !git pad ${1:-origin/master}..${2:-@}
padp = !git pad "$(git parent)"
parent = !git parentraw 2>/dev/null
parentraw = !git show-branch | sed \"s/].*//\" | grep \"\\*\" | grep -v \"$(git rev-parse --abbrev-ref HEAD)\" | head -n1 | sed \"s/^.*\\[//\"
prev = !git checkout "$(git parent)"
#q =
quote = show --pretty=reference --no-patch
r = rebase
ri = rebase -i
ra = rebase --abort
rc = rebase --continue
rr = stacked-rebase
rom = rebase origin/master
riom = rebase -i origin/master
rum = rebase upstream/master
rium = rebase -i upstream/master
riw = !EDITOR=true git ri
rcw = !EDITOR=true git rc
riomw = !EDITOR=true git riom
riumw = !EDITOR=true git rium
# https://github.com/kiprasmel/git-rebase-diff
rd = rebase-diff
rad = range-diff
re = rerere
# https://github.com/kiprasmel/git-stacked-rebase
#stacked-rebase = stacked-rebase
stacked-rebase-prod = !npx git-stacked-rebase
rs = reset
rgrep = !git grep "$1" $(git rev-list --all)
s = status
sa = status --untracked-files=all
si = status --ignored=traditional
so = show
sos = show --stat
soc = !git show "$(pbpaste)"
som = show --pretty=format:"%B" -q
st = stash
sto = stash show
stso = sto
stop = stash show -p
stsop = stop
stu = stuk
stuk = stash --include-untracked --keep-index
stp = stash pop
stl = stash list
stash-unapply = !git stash show -p | git apply -Rc
sb = show-branch
spo = sparse-checkout
t = tag
tt = tas
tas = tag -a -s
#u =
#v =
#w =
#x =
#y =
#z =