-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitconfig
More file actions
519 lines (468 loc) · 18.8 KB
/
Copy path.gitconfig
File metadata and controls
519 lines (468 loc) · 18.8 KB
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
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
[user]
email = github@elvis.ai
name = elvis kahoro
[alias]
a = "!graphite add"
aa = "!graphite add ."
dd = aa
aaa = aa
aaaa = aa
absorb = "!graphite absorb"
ab = absorb
abb = absorb
abn = absorb
cab = asborb
ap = "!graphite add --patch"
au = "!graphite add -u"
aiu = au
ai = au
aui = au
gau = au
aq = au
qu = au
auy = au
auu = au
aug = au
ua = au
aui = au
gau = au
auq = au
aau = au
dau = au
gau = au
aug = au
auca = "!graphite au && graphite ca"
bc = "!graphite create"
gbc = switch -c
bcx = bc
bcdl = bc
cdl = bc
cb = bc
bce = bc
bvc = bc
bci = "!graphite create --insert"
gbc = switch -c
bcn = "!graphite branch create --no-verify"
be = "!graphite downstack edit"
gbl = branch -a
bl = branch --list
bd = "!f() { if [ $# -eq 0 ]; then graphite down; else graphite down $1; fi }; f"
bds = bd
db = bd
bp = bd
gbd = bd
bdd = "!graphite down && git diff HEAD~$1"
bdl = "!graphite branch delete"
brd = "!graphite branch unbranch"
gbrd = branch -D
bgrd = gbrd
brvd = gbrd
grb = gbrd
brd = gbrd
gdd = gbrd
grd = gbrd
gbdd = gbrd
grbd = gbrd
gbtd = gbrd
gbr = gbrd
gbd = gbrd
brf = "!graphite branch fold"
brsf = brf
brn = "!graphite rename"
rbn = brn
brsp = "!graphite split"
bsp = brsp
brsq = "!graphite squash"
brrsq = brsq
brt = "!graphite track"
bt = brt
btt = bt
btm = "!graphite bottom"
bu = "!f() { if [ $# -eq 0 ]; then graphite up; else graphite up $1; fi }; f"
bn = bu
by = bu
nu = bu
buu = bu
dbu = bu
lbu = bu
ub = bu
bug = bu
gbu = bu
buy = bu
buff = "!graphite up && git push --force"
#bucc = "!graphite upstack test 'trunk check --fix --ignore-git-state'"
bucc = "!graphite up && trunk check --fix --filter=-trivy,-checkov,-osv-scanner,-semgrep"
bcc = bucc
buc = bucc
bud = "!graphite up && git diff HEAD~$1"
bca = "!graphite up && trunk check --fix --ignore-git-state --filter=-trivy,-checkov,-osv-scanner"
ca = "!graphite modify"
ac = ca
aca = ca
cva = ca
gca = commit --amend --no-edit --no-verify
cam = "!graphite modify"
acam = cam
cvam = cam
acm = cam
cma = cam
canm = cam
cc = "!trunk check --fix --filter=-trivy,-checkov,-osv-scanner,-semgrep"
gcc = cc
cxc = cc
cca = "!trunk check --fix --all --ignore-git-state"
ccf = cca
#cca = "!trunk check --fix --all --ignore-git-state --filter=-trivy,-checkov,-osv-scanner,-trufflehog"
cac = cca
ccc = cca
ccca = cca
cfa = !trunk fmt --all --ignore-git-state
cl = "!chalk lint"
ccl = cl
chalk = "!chalk"
ch = checkout
cv = ch
gh = ch
hc = ch
bch = ch
hch = ch
gcvo = ch
cvh = ch
chr = checkout run
cloen = clone
cr = chr
check = "!trunk check"
co = "! graphite modify -c"
gco = commit
gcxo = gco
cgco = gco
gso = gco
ggco = gco
comit = gco
goc = gco
gcp = gco
com = "!graphite commit -m"
con = "!graphite commit create --no-verify"
gcon = commit --no-verify
ct = "!graphite continue"
ctr = ct
continue = ct
cp = "!graphite cherry-pick"
cpa = "!graphite cherry-pick --abort"
cpc = "!graphite cherry-pick --continue"
d = "!f() { if [ $# -eq 0 ]; then git diff; else git diff HEAD~$1; fi }; f"
dash = "!gh dash"
f = d
dd = d 1
d1 = d 1
dc = "!graphite diff --cached"
dcd = dc
ddc = dc
ds = "!f() { if [ $# -eq 0 ]; then git show --name-only; else git log --name-only -$1; fi }; f"
dsr = "!graphite downstack restack"
dst = "!graphite downstack test"
dl = "!f() { if [ $# -eq 0 ]; then git show --name-only; else git show --name-only HEAD~$(($1 - 1)); fi }; f"
gdl = dl
dk = dl
ld = dl
dls = dl
ldl = dl
ddl = dl
dlk = dl
du = "!less $(git ls-files --others --exclude-standard)"
drun = branch -D run
g = "!git"
get = "!graphite get"
gh = "!gh"
git = "!git"
iit = init
int = init
inti = init
l = "!graphite log --reverse --show-untracked"
al = l
k = l
sl = l
ll = "!graphite log short --reverse --show-untracked"
ls = ls-files
gl = log
lt = log --oneline
m = !git-m
gm = m
dm = m
mmm = "!git push . $(git symbolic-ref --short HEAD):main"
mere = merge
mrege = merge
mege = merge
o = "!gh pr view --web || gh repo view --web"
open = o
go = "!graphite pr"
gfo = go
onto = "!graphite upstack onto"
pbd = "!git push --no-verify origin --delete $(git branch --show-current)"
pbf = "!graphite push -u origin HEAD"
pbdf = "!git push --no-verify origin --delete $(git branch --show-current) && git push --no-verify -u origin HEAD"
pl = "!graphite pull"
puill = pl
ipull = pl
poull = pl
pou = pl
pul = pl
oul = pl
oull = pl
ull = pl
pulp = pl
plm = "!graphite fetch origin main:main"
prev = "!f() { if [ $# -eq 0 ]; then git checkout HEAD^1; else git checkout HEAD^$1; fi }; f"
prv = "!graphite pr"
gpr = "!gh pr create --web"
pshy = push
pusuh = push
puis = push
puish = push
pushj = push
psu = push
pus = push
pusj = push
psuh = push
ppush = push
psh = push
puh = push
poush = push
oush = push
piush = push
pusdh = push
poiush = push
ush = push
pousr = push
puff = push --force
rse = rs
r = "!f() { if [ $# -eq 0 ]; then git reset; else git reset HEAD~$1 --mixed; fi }; f"
rest = r
reet = r
rset = r
rst = r
reest = r
res = r
e = r
rcb = "!vim ~/.bashrc"
rcg = "!vim ~/.gitconfig"
review = "!f() { sha=$(git rev-parse HEAD) || return 1; if roborev list --json --limit 0 | jq -e --arg s \"$sha\" 'any(.[]; ((.git_ref // \"\") | startswith($s[0:12])) and .status != \"failed\")' >/dev/null 2>&1; then echo \"roborev: review already exists for ${sha:0:12} — skipping\"; else roborev review --wait \"$@\"; fi; }; f"
rebae = rebase
reabse = rebase
rebse = rebase
rebae = rebase
roborev = !roborev
rb = "!graphite rebase"
rba = "!graphite rebase --abort"
rbm = "!graphite rebase main"
rbc = "!graphite continue"
grbc = rebase --continue
reo = "!graphite reorder"
rr = "!reflex run"
rs = !graphite restack
s = status
sg = s
gs = s
#ss = "!gh pr create"
ss = "!gh pr create --fill --web"
ssg = "!gh pr create --web"
sgs = ssg
sss = ss
sds = ss
gss = ssg
ssp = ssg
sw = "!graphite switch"
swc = "!graphite switch -c"
sh = "!f() { if [ $# -eq 0 ]; then git show; else git show HEAD~$1; fi }; f"
gsq = "!f() { if [ $# -gt 2 ]; then echo "must be more than one"; else git rebase -i HEAD~$1; fi }; f"
sta = "!graphite stash"
atash = sta
tas = sta
stah = sta
stahs = sta
stsh = sta
stsa = sta
tsash = sta
bta = sta
stahs = sta
tash = sta
stas = sta
sgta = sta
stcc = stash clear
stp = "!graphite stash pop"
spt = stp
stop = stp
tp = stp
sto = stp
sp = stp
stpo = stp
st = "!graphite stash --patch"
ta = st
astash = stash
stau = "!graphite stash --include-untracked"
stcc = "!graphite stash clear"
std = "!graphite stash drop"
tsd = std
setd = std
stdt = std
sted = std
stgd = std
std2 = "!graphite stash drop && graphite stash drop"
stl = "!graphite stash list"
sts = "!graphite stash show"
sinit = submodule init
su = submodule update
sur = submodule update --init --recursive
sinitr = sur
smain = "!git submodule foreach --recursive `git checkout main`"
spull = "!git submodule foreach --recursive `git pull`"
spush = "!f() { if [ $# -eq 0 ]; then git submodule foreach --recursive "git add ."; git submodule foreach --recursive "git commit -m c"; git push --recurse-submodules=on-demand; else git submodule foreach --recursive "git add ."; git submodule foreach --recursive "git commit -m $1"; git push --recurse-submodules=on-demand; fi } f"
staash = stash
sstash = submodule foreach --recursive "git stash"
astsh = stash
sync = "!graphite sync"
t = "!uv run pytest -n auto"
test = t
top = "!graphite top"
vtop = top
op = top
otp = top
topd = "!graphite top && graphite down"
topn = topd
topb = topd
u = au
uso = "!graphite move"
usor = uso
usro = uso
usi = uso
usoi = uso
usso = uso
uos = uso
suo = uso
usp = uso
pusr = "!git push && graphite restack --upstack"
puysr = pusr
pisr = pusr
psir = pusr
psur = pusr
psr = pusr
jpusr = pusr
pusrt = pusr
usr = "!graphite restack --upstack"
us = usr
uisr = usr
usir = usr
usrt = usr
sur = usr
ust = "!graphite upstack test"
wls = worktree list
wsl = worktree list
x = checkout -
count-lines= "!git log --author=\"$1\" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf \"added lines: %s, removed lines: %s, total lines: %s\\n\", add, subs, loc }' #"
caic = "!DIFF=$(git diff --cached) && if [ -z \"$DIFF\" ]; then DIFF=$(git diff HEAD~1 HEAD) && AMEND=true; else AMEND=false; fi && if [ -z \"$DIFF\" ]; then echo \"Error: no staged changes and no previous commit to diff\" >&2; exit 1; fi && MSG=$(curl -s https://api.anthropic.com/v1/messages -H \"x-api-key: $ANTHROPIC_API_KEY\" -H \"anthropic-version: 2023-06-01\" -H \"content-type: application/json\" -d \"$(jq -n --arg diff \"$DIFF\" '{model:\"claude-haiku-4-5-20251001\",max_tokens:100,messages:[{role:\"user\",content:(\"Create a concise git commit message in conventional commits format (type: description). Return ONLY the message, nothing else.\\n\\n\" + $diff)}]}')\" 2>/dev/null | jq -r \".content[0].text\") && if [ -z \"$MSG\" ] || [ \"$MSG\" = \"null\" ]; then echo \"Error: API call failed to generate commit message\" >&2; exit 1; fi && if [ \"$AMEND\" = true ]; then git commit --amend -m \"$MSG\"; else git commit -m \"$MSG\"; fi"
# cai = !MSG=$(git aislc) && git commit -m \"$MSG\"
caip = !git caic && git push
caix = "!DIFF=$(git diff --cached) && if [ -z \"$DIFF\" ]; then DIFF=$(git diff HEAD~1 HEAD) && AMEND=true; else AMEND=false; fi && if [ -z \"$DIFF\" ]; then echo \"Error: no staged changes and no previous commit to diff\" >&2; exit 1; fi && MSG=$(curl -s https://api.kilo.ai/api/gateway/chat/completions -H \"Authorization: Bearer $KILO_API_KEY\" -H \"Content-Type: application/json\" -d \"$(jq -n --arg diff \"$DIFF\" '{model:\"google/gemini-3.5-flash-lite\",messages:[{role:\"system\",content:\"Write a concise git commit message in Conventional Commits format (type: description or type(scope): description). Return only the message.\"},{role:\"user\",content:(\"Create a commit message for this diff:\\n\\n\" + $diff)}],max_tokens:80,temperature:0.2}')\" 2>/dev/null | jq -r '.choices[0].message.content // empty') && if [ -z \"$MSG\" ] || [ \"$MSG\" = \"null\" ]; then echo \"Error: API call failed to generate commit message\" >&2; exit 1; fi && if [ \"$AMEND\" = true ]; then git commit --amend -m \"$MSG\"; else git commit -m \"$MSG\"; fi"
caiux = caix
caiox = caix
casix = caix
cax = caix
caiax = caix
acix = caix
ciax = caix
caux = caix
xai = caix
xaic = caix
caox = caix
caoix = caix
vaix = caix
cai = caix
bcw = "!f() { git worktree add -b \"$1\" \"$(git rev-parse --show-toplevel)/worktrees/$1\" && echo \"$(git rev-parse --show-toplevel)/worktrees/$1\"; }; f"
brw = "!f() { branch=$(git -C \"$1\" rev-parse --abbrev-ref HEAD 2>/dev/null); git worktree remove \"$1\" && { [ -n \"$branch\" ] && git branch -d \"$branch\" 2>/dev/null; echo \"Removed worktree: $1${branch:+ (branch: $branch)}\"; }; }; f"
gbrw = "!f() { branch=$(git -C \"$1\" rev-parse --abbrev-ref HEAD 2>/dev/null); git worktree remove \"$1\" && { [ -n \"$branch\" ] && git branch -d \"$branch\" 2>/dev/null; echo \"Removed worktree: $1${branch:+ (branch: $branch)}\"; }; }; f"
wd = "!f() { branch=$(git -C \"$1\" rev-parse --abbrev-ref HEAD 2>/dev/null); git worktree remove \"$1\" && { [ -n \"$branch\" ] && git branch -d \"$branch\" 2>/dev/null; echo \"Removed worktree: $1${branch:+ (branch: $branch)}\"; }; }; f"
branch-rename-with-ai = "!if ! git diff --cached --quiet; then echo \"Error: staged changes present; commit or unstage before running\" >&2; exit 1; fi && DIFF=$(git diff HEAD~1 HEAD 2>/dev/null) && if [ -z \"$DIFF\" ]; then echo \"Error: no previous commit to diff\" >&2; exit 1; fi && MSG=$(curl -s https://api.openai.com/v1/responses -H \"Authorization: Bearer $OPENAI_API_KEY\" -H \"Content-Type: application/json\" -d \"$(jq -n --arg diff \"$DIFF\" '{model:\"gpt-4.1-mini\",input:[{role:\"system\",content:\"Write a concise git branch name in kebab-case with a Conventional Commits prefix (e.g. feat/add-user-login, fix/typo-in-readme, chore/update-deps). Use 2-6 words after the slash. Return ONLY the branch name, no quotes, no trailing punctuation, no explanation.\"},{role:\"user\",content:(\"Create a branch name for this diff:\\n\\n\" + $diff)}],max_output_tokens:40,temperature:0.2}')\" 2>/dev/null | jq -r '.output_text // ([.output[]?.content[]?.text // empty] | join(\"\"))') && if [ -z \"$MSG\" ] || [ \"$MSG\" = \"null\" ]; then echo \"Error: API call failed to generate branch name\" >&2; exit 1; fi && printf \"%s\\n\" \"$MSG\""
brai = !MSG=$(git branch-rename-with-ai) && graphite rename \"$MSG\"
brau = brai
aislc = "!DIFF=$(git diff --cached) && if [ -z \"$DIFF\" ]; then echo \"Error: no staged changes\" >&2; exit 1; fi && MSG=$(curl -s https://api.anthropic.com/v1/messages -H \"x-api-key: $ANTHROPIC_API_KEY\" -H \"anthropic-version: 2023-06-01\" -H \"content-type: application/json\" -d \"$(jq -n --arg diff \"$DIFF\" '{model:\"claude-haiku-4-5-20251001\",max_tokens:100,messages:[{role:\"user\",content:(\"Create a concise git commit message in conventional commits format (type: description). Return ONLY the message, nothing else.\\n\\n\" + $diff)}]}')\" 2>/dev/null | jq -r \".content[0].text\") && if [ -z \"$MSG\" ] || [ \"$MSG\" = \"null\" ]; then echo \"Error: API call failed to generate commit message\" >&2; exit 1; fi && printf \"%s\\n\" \"$MSG\""
aiclx = "!DIFF=$(git diff --cached) && if [ -z \"$DIFF\" ]; then echo \"Error: no staged changes\" >&2; exit 1; fi && MSG=$(curl -s https://api.openai.com/v1/responses -H \"Authorization: Bearer $OPENAI_API_KEY\" -H \"Content-Type: application/json\" -d \"$(jq -n --arg diff \"$DIFF\" '{model:\"gpt-4.1-mini\",input:[{role:\"system\",content:\"Write a concise git commit message in Conventional Commits format (type: description or type(scope): description). Return only the message.\"},{role:\"user\",content:(\"Create a commit message for this staged diff:\\n\\n\" + $diff)}],max_output_tokens:80,temperature:0.2}')\" 2>/dev/null | jq -r '.output_text // ([.output[]?.content[]?.text // empty] | join(\"\"))') && if [ -z \"$MSG\" ] || [ \"$MSG\" = \"null\" ]; then echo \"Error: API call failed to generate commit message\" >&2; exit 1; fi && printf \"%s\\n\" \"$MSG\""
bcai = !MSG=$(git aiclx) && graphite create -m \"$MSG\"
bcao = bcai
gcai = !MSG=$(git aiclx) && git commit -m \"$MSG\"
tai = "!f() { sha=$(git rev-parse HEAD) || return 1; if roborev list --json --limit 0 | jq -e --arg s \"$sha\" 'any(.[]; ((.git_ref // \"\") | startswith($s[0:12])) and .status != \"failed\")' >/dev/null 2>&1; then echo \"roborev: review already exists for ${sha:0:12} — waiting\"; roborev wait \"$@\"; else roborev review --wait \"$@\"; fi; }; f"
mt = "!f() { git push . \"$1\":main; }; f"
[init]
defaultBranch = main
[fetch]
prune = true
[pull]
rebase = true
[push]
default = simple
autoSetupRemote = true
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[core]
excludesfile = /Users/elvis/.gitignore_global
editor = vim
pager = delta
hooksPath = /Users/elvis/.config/git/hooks
[delta]
navigate = true # use n and N to move between diff sections
line-numbers = true
side-by-side = false
features = dark-mode # default; override per-shell with DELTA_FEATURES=light-mode
[delta "dark-mode"]
light = false
syntax-theme = Monokai Extended
minus-style = red "#ffeeee"
plus-style = green "#383830"
[delta "light-mode"]
light = true
syntax-theme = gruvbox-light
minus-style = syntax "#ffd7d7"
plus-style = syntax "#d7ffaf"
[diff]
colorMoved = default
[color]
status = auto
diff = auto
branch = auto
interactive = auto
grep = auto
ui = auto
[interactive]
diffFilter = delta --color-only
[stash]
showStat = true
showPatch = true
[merge]
conflictstyle = diff3
[http]
cookiefile = ~/.config/.gitcookies
[commit]
template = ~/.config/git/.gitmessage
[credential "https://github.com"]
helper =
helper = !/opt/homebrew/bin/gh auth git-credential
[credential "https://source.developers.google.com"]
helper = gcloud.sh
[color "blame"]
repeatedLines = bold 114
highlightedLine = bold 226
highlightedBoundary = bold 161
[coderabbit]
machineId = cli/88a013c1cb39466287b4a9fee534ef17
[gitbutler]
aiOpenAIKeyOption = butlerAPI
[credential "https://gist.github.com"]
helper =
helper = !/opt/homebrew/bin/gh auth git-credential
[credential "https://dolthub.com"]
username = elvis
useHttpPath = true
[beads]
role = maintainer