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