]> git.netwichtig.de Git - user/henk/vcsh/git.git/blob - .config/git/config
I use tabs now
[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 [log]
41   # show short commit sha
42   abbrevCommit = true
43   # show short ref names but only in terminal
44   decorate = auto
45 [merge]
46   # use vimdiff as mergetool
47   tool = vimdiff
48 [pretty]
49   compact = %C(auto)%h%Cgreen% cs%Cblue%<(15,trunc)% an%C(auto)%d%Creset% s
50 [push]
51   # push to branch with same name on remote
52   default = current
53   # also push reachable annotated tags
54   followTags = true
55 [pull]
56   # rebase, don’t merge, local changes
57   rebase = true
58   # only accept fastforwards by default
59   ff = only
60 [rebase]
61   # when in a dirty worktree, automatically create a stash before and apply after rebasing
62   autoStash = true
63   # automatically squash marked commits (squash! …, fixup! …)
64   autoSquash = true
65 [rerere]
66   # don’t use rerere to resolve merge conflicts
67   enabled = false
68
69 [alias]
70   a  = add
71   aa = add --all
72   ai = add --interactive
73   ap = add --patch
74   au = add --update
75
76   b      = branch
77   br     = branch
78   bra    = branch --all
79   brav   = branch --all --verbose --verbose
80
81   co  = checkout
82
83   cp  = cherry-pick
84   cpa = cherry-pick --abort
85   cpc = cherry-pick --continue
86
87   c     = commit
88   ca    = commit --all
89   cm    = commit --message
90   cam   = commit --all --message
91   fix   = commit --all --fixup
92
93   d     = diff --word-diff
94   dc    = diff --cached
95   dlc   = diff --cached HEAD^
96   ds    = diff --staged
97   dr    = "!f() { git diff -w "$1"^.."$1"; }; f"
98   diffr = "!f() { git diff "$1"^.."$1"; }; f"
99
100   # grep on filename
101   f = "!git ls-files | grep -i"
102
103   g    = grep -I
104   gr   = grep -I
105   gra  = "!sh -c 'git grep "$0" "$@" "$(git for-each-ref --format=\"%(refname)\"" refs/)'"
106   grep = grep -I
107
108   log     = log --graph
109   l       = log --graph
110   la      = log --graph --all
111   lap     = log --graph --all --patch
112   lp      = log --patch
113   ls      = log --stat
114   # tag logs
115   taglog = "log --tags --simplify-by-decoration --pretty='format:%ci %d'"
116
117   pl  = pull
118   pla = pull --all
119
120   ps     = push
121   please = push --force-with-lease
122
123   rem  = remote
124   remp = remote prune
125   remu = remote update
126
127   frbp = "!f() { git fetch; git rebase "$1"; git push --force-with-lease; }; f"
128   rb   = rebase
129   rba  = rebase --abort
130   rbc  = rebase --continue
131   rbi  = rebase --interactive
132
133   r   = reset
134   r1  = reset HEAD^
135   r2  = reset HEAD^^
136   rh  = reset --hard
137   rh1 = reset --hard HEAD^
138   rh2 = reset --hard HEAD^^
139
140   rs = restore
141
142   sl = stash list
143   sa = stash apply
144   sp = stash pop
145   ss = stash save
146
147   st = status --short
148
149   sw = switch
150   swc = switch --create
151
152   # add subtree
153   sba = "!f() { git subtree add --prefix $2 $1 master --squash; }; f"
154   # update/pull subtree
155   sbu = "!f() { git subtree pull --prefix $2 $1 master --squash; }; f"
156
157   # initial empty commit
158   empty = "!git commit -am\"[empty] Initial commit\" --allow-empty"
159
160   wl = worktree list
161
162   serve = daemon --reuseaddr --verbose --base-path=. --export-all ./.git