nixos configs
1[core]
2 sshCommand = git-ssh-dispatch
3 editor = v
4 # no SIGPIPE exit codes (usually 128+13=141) if you exit less before reading all piped input
5 # but potentially slow, because sponge first consumes, before it passes on
6 pager = zsh -c 'sponge | less -S'
7[branch]
8 sort = "-committerdate"
9[color]
10 ui = true
11 diff = auto
12[commit]
13 verbose = true
14[diff]
15 algorithm = "histogram"
16 colorMoved = "plain"
17 mnemonicPrefix = true
18 renames = true
19[fetch]
20 all = true
21 prune = true
22 pruneTags = true
23[init]
24 defaultBranch = "main"
25[merge]
26 conflictstyle = "zdiff3"
27 tool = "v"
28[push]
29 autoSetupRemote = true
30 default = simple
31[rebase]
32 autoSquash = true
33 autoStash = true
34 updateRefs = true
35[rerere]
36 autoupdate = true
37 enabled = true
38[tag]
39 sort = "version:refname"
40[user]
41 name = "Yves Ineichen"
42 signingKey = "165AEDEB"
43[alias]
44 b = "branch -vv"
45 ba = "branch -avv"
46 c = "commit"
47 cm = "commit -m"
48 co = "checkout"
49 cf = "!git checkout $(git branch -a --format '%(refname:short)' | sed 's~origin/~~' | sort | uniq | fzf)"
50 f = "fetch --all --tags --prune --force"
51 m = "merge"
52 p = "push"
53 pu = "push -u origin HEAD"
54 s = "-c advice.statusHints=false status --show-stash"
55
56 d = "diff -C"
57 ds = "diff -C --stat"
58 dsp = "diff -C --stat -p"
59 dw = "diff -C --color-words"
60
61 l = "log -C --decorate"
62 ls = "log -C --stat --decorate"
63 lsp = "log -C --stat -p --decorate"
64
65 lc = "log ORIG_HEAD.. --stat --no-merges"
66
67 lg = "log --graph '--pretty=tformat:%Cblue%h%Creset %Cgreen%ar%Creset %Cblue%d%Creset %s'"
68 lga = "log --graph '--pretty=tformat:%Cblue%h%Creset %Cgreen%ar%Creset %Cblue%d%Creset %s' --all"
69 l19 = "log --graph '--pretty=tformat:%Cblue%h%Creset %Cgreen%ar%Creset %Cblue%d%Creset %s' --all -19"
70 lsd = "log --graph '--pretty=tformat:%Cblue%h%Creset %Cgreen%ar%Creset %Cblue%d%Creset %s' --all --simplify-by-decoration"
71 lfp = "log --graph '--pretty=tformat:%Cblue%h%Creset %Cgreen%ar%Creset %Cblue%d%Creset %s' --first-parent"
72
73 # "show-branch -g=N" can't be aliased for N easily, so we stop here:
74 sb = "show-branch --sha1-name"
75
76 ru = "remote update"
77 rbi = "rebase -i"
78 rbc = "rebase --continue"
79 rbim = "rebase -i main"
80 # instead of git pull --rebase
81 ro = "rebase origin/$(git branch --show-current)"
82
83 ls-del = "ls-files -d"
84 ls-mod = "ls-files -m"
85 ls-new = "ls-files --exclude-standard -o "
86 ls-ign = "ls-files --exclude-standard -o -i"
87
88 # whois = "!sh -c 'git log -i -1 --pretty=\"format:%an <%ae>\n\" --author=\"$1\"' -"
89 # whatis = "show -s --pretty='tformat:%h (%s, %ad)' --date=short"
90
91 edit-unmerged = "!f() { git diff --name-status --diff-filter=U | cut -f2 ; }; v `f`"
92 add-unmerged = "!f() { git diff --name-status --diff-filter=U | cut -f2 ; }; git add `f`"
93
94 # fixup
95 fu = "commit --amend --reset-author -C HEAD"
96 fuu = "!git add -u && git fu"
97 fua = "!f() { git commit --fixup=amend:$1; }; f"