]> git.netwichtig.de Git - user/henk/vcsh/git.git/blob - .config/git/config
bf56d483cc75a251837948a05bc46ec3e5107007
[user/henk/vcsh/git.git] / .config / git / config
1 [user]
2   name = Hendrik Jäger
3   email = gitcommit@henk.geekmail.org
4   signingKey = 0x1B7EADFDDF720123
5
6 [branch]
7   # always make new branches rebase on their tracking branch
8   autosetuprebase = always
9 [commit]
10   # show diff in commit message editor
11   verbose = true
12 [core]
13   # complain about tabs used for indenting
14   # commented because I switched to tabs
15   # and yaml can’t use tabs
16   # so either variant will  complain
17   # whitespace = tab-in-indent
18 [diff]
19   # use (i)ndex, (w)orktree, (c)ommit, etc instead of a/ and b/
20   mnemonicprefix = true
21   # detect renames and copies
22   renames = copies
23   # use different color for moved code (default == zebra, currently)
24   colorMoved = default
25   # use vimdiff as difftool
26   tool = vimdiff
27 [difftool]
28   # do not prompt before invoking difftool
29   prompt = false
30 [fetch]
31   # delete tracking references and info about remote branches
32   # does not delete any branches
33   prune = true
34 [format]
35   # show a lot of info by default
36   pretty=compact
37 [grep]
38   # show linenumber (-n)
39   lineNumber = true
40 [init]
41   defaultBranch = main
42 [log]
43   # show short commit sha
44   abbrevCommit = true
45   # show short ref names but only in terminal
46   decorate = auto
47 [merge]
48   # use vimdiff as mergetool
49   tool = vimdiff
50 [pretty]
51   compact = %C(auto)%h%Cgreen% cs%Cblue%<(15,trunc)% an%C(auto)%d%Creset% s
52 [push]
53   # push to branch with same name on remote
54   default = current
55   # also push reachable annotated tags
56   followTags = true
57 [pull]
58   # rebase, don’t merge, local changes
59   rebase = true
60   # only accept fastforwards by default
61   ff = only
62 [rebase]
63   # when in a dirty worktree, automatically create a stash before and apply after rebasing
64   autoStash = true
65   # automatically squash marked commits (squash! …, fixup! …)
66   autoSquash = true
67 [rerere]
68   # don’t use rerere to resolve merge conflicts
69   enabled = false
70
71 [alias]
72   a  = add
73   aa = add --all
74   ai = add --interactive
75   ap = add --patch
76   au = add --update
77
78   b      = branch
79   br     = branch
80   bra    = branch --all
81   brav   = branch --all --verbose --verbose
82
83   co  = checkout
84
85   cp  = cherry-pick
86   cpa = cherry-pick --abort
87   cpc = cherry-pick --continue
88
89   c     = commit
90   ca    = commit --all
91   cm    = commit --message
92   cam   = commit --all --message
93   fix   = commit --all --fixup
94
95   d     = diff --word-diff
96   dc    = diff --cached
97   dlc   = diff --cached HEAD^
98   ds    = diff --staged
99   dr    = "!f() { git diff -w "$1"^.."$1"; }; f"
100   diffr = "!f() { git diff "$1"^.."$1"; }; f"
101
102   # grep on filename
103   f = "!git ls-files | grep -i"
104
105   g    = grep -I
106   gr   = grep -I
107   gra  = "!sh -c 'git grep "$0" "$@" "$(git for-each-ref --format=\"%(refname)\"" refs/)'"
108   grep = grep -I
109
110   log     = log --graph
111   l       = log --graph
112   la      = log --graph --all
113   lap     = log --graph --all --patch
114   lp      = log --patch
115   ls      = log --stat
116   # tag logs
117   taglog = "log --tags --simplify-by-decoration --pretty='format:%ci %d'"
118
119   pl  = pull
120   pla = pull --all
121
122   ps     = push
123   please = push --force-with-lease
124
125   rem  = remote
126   remp = remote prune
127   remu = remote update
128
129   frbp = "!f() { git fetch; git rebase "$1"; git push --force-with-lease; }; f"
130   rb   = rebase
131   rba  = rebase --abort
132   rbc  = rebase --continue
133   rbi  = rebase --interactive
134   rbm = "!f() { git switch "$1" && git rebase - && git switch - && git merge -; }; f"
135
136   r   = reset
137   r1  = reset HEAD^
138   r2  = reset HEAD^^
139   rh  = reset --hard
140   rh1 = reset --hard HEAD^
141   rh2 = reset --hard HEAD^^
142
143   rs = restore
144
145   sl = stash list
146   sa = stash apply
147   sp = stash pop
148   ss = stash save
149
150   st = status --short
151
152   sw = switch
153   swc = switch --create
154
155   # add subtree
156   sba = "!f() { git subtree add --prefix $2 $1 master --squash; }; f"
157   # update/pull subtree
158   sbu = "!f() { git subtree pull --prefix $2 $1 master --squash; }; f"
159
160   # initial empty commit
161   empty = "!git commit -am\"[empty] Initial commit\" --allow-empty"
162
163   wl = worktree list
164
165   serve = daemon --reuseaddr --verbose --base-path=. --export-all ./.git