-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgitconfig
More file actions
87 lines (82 loc) · 2.19 KB
/
Copy pathgitconfig
File metadata and controls
87 lines (82 loc) · 2.19 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
[user]
name = Sanjit Bhat
email = sanjit.bhat@gmail.com
signingkey = ~/.ssh/id_ed25519.pub
# security.
[gpg]
format = ssh
[commit]
gpgsign = true
# core git ops.
[branch]
autosetuprebase = always
[pull]
rebase = true
[rebase]
autoStash = true
[push]
autoSetupRemote = true
# random settings.
[core]
autocrlf = input
editor = nvim
excludesfile = ~/.gitignore
pager = delta
[advice]
detachedHead = false
statusHints = false
[color]
ui = true
[init]
defaultBranch = main
# TODO: many cmd params have analogs in gitconfig settings.
# decide which is the better place to put stuff.
[alias]
ad = add
br = branch --verbose
ci = commit --edit
cia = commit --amend
cl = clone
df = diff
# format: "<hash><branch>|<date>|<committer>|<title>".
# compact-summary: show changed files, lines, modes.
# stat-count: max 7 files.
lg = log --graph --format='%C(auto)%h%d|%as|%cn|%s' --compact-summary --stat-count=7
# this doesn't seem to work: fetch.recurseSubmodules = on-demand
pl = !git pull && git submodule update
pu = push
rb = rebase
# resign all commits since upstream. claude lacks my signing key.
resign = rebase --exec 'git commit --amend --only --no-edit --gpg-sign'
ro = remote
rs = reset
rsh = reset --hard
rt = restore --worktree
rts = restore --staged
rta = restore --staged --worktree
rv = revert
# stage-add.
# it's annoying to manually stage files by path.
# this opens un-staged files in fzf, where they can be staged with Tab+Enter.
sa = !git ls-files --deleted --modified --others --deduplicate --exclude-standard | \
fzf --multi --preview 'git diff -- {} | delta --light' | \
xargs git add
sh = show
sm = submodule
smu = submodule update
ss = status
st = stash
sw = switch --recurse-submodules
wt = worktree
# use `delta` for `git diff`.
[interactive]
diffFilter = delta --color-only
[delta]
# use n and N to move between diff sections.
navigate = true
hyperlinks = true
[merge]
conflictstyle = zdiff3
[diff]
# detect moved blocks of code and style them differently.
colorMoved = default