2 # for [user] section with email, realname, signing key, etc
6 # always make new branches rebase on their tracking branch
7 autosetuprebase = always
9 # show diff in commit message editor
12 # complain about tabs used for indenting
13 # commented because I switched to tabs
14 # and yaml can’t use tabs
15 # so either variant will complain
16 # whitespace = tab-in-indent
18 # use (i)ndex, (w)orktree, (c)ommit, etc instead of a/ and b/
20 # detect renames and copies
22 # use different color for moved code (default == zebra, currently)
24 # use vimdiff as difftool
27 # do not prompt before invoking difftool
30 # delete tracking references and info about remote branches
31 # does not delete any branches
34 # show a lot of info by default
37 # show linenumber (-n)
42 # show short commit sha
44 # show short ref names but only in terminal
47 # use vimdiff as mergetool
50 compact = %C(auto)%h%Cgreen% cs%Cblue%<(15,trunc)% an%C(auto)%d%Creset% s
52 # push to branch with same name on remote
54 # also push reachable annotated tags
57 # rebase, don’t merge, local changes
59 # only accept fastforwards by default
62 # when in a dirty worktree, automatically create a stash before and apply after rebasing
64 # automatically squash marked commits (squash! …, fixup! …)
67 # don’t use rerere to resolve merge conflicts
73 ai = add --interactive
80 brav = branch --all --verbose --verbose
85 cpa = cherry-pick --abort
86 cpc = cherry-pick --continue
91 cam = commit --all --message
92 fix = commit --all --fixup
96 dlc = diff --cached HEAD^
98 dr = "!f() { git diff -w "$1"^.."$1"; }; f"
99 diffr = "!f() { git diff "$1"^.."$1"; }; f"
102 f = "!git ls-files | grep -i"
106 gra = "!sh -c 'git grep "$0" "$@" "$(git for-each-ref --format=\"%(refname)\"" refs/)'"
111 la = log --graph --all
112 lap = log --graph --all --patch
116 taglog = "log --tags --simplify-by-decoration --pretty='format:%ci %d'"
122 please = push --force-with-lease
128 frbp = "!f() { git fetch; git rebase "$1"; git push --force-with-lease; }; f"
131 rbc = rebase --continue
132 rbi = rebase --interactive
133 rbm = "!f() { git switch "$1" && git rebase - && git switch - && git merge -; }; f"
139 rh1 = reset --hard HEAD^
140 rh2 = reset --hard HEAD^^
152 swc = switch --create
155 sba = "!f() { git subtree add --prefix $2 $1 master --squash; }; f"
156 # update/pull subtree
157 sbu = "!f() { git subtree pull --prefix $2 $1 master --squash; }; f"
159 # initial empty commit
160 empty = "!git commit -am\"[empty] Initial commit\" --allow-empty"
164 serve = daemon --reuseaddr --verbose --base-path=. --export-all ./.git