]> git.netwichtig.de Git - user/henk/vcsh/git.git/blob - .config/git/config
53e10fbb048f0060b22f178a8d9d1d6ebe1fe65f
[user/henk/vcsh/git.git] / .config / git / config
1 [user]
2   name = Hendrik Jäger
3   email = gitcommit@henk.geekmail.org
4
5 [branch]
6   # always make new branches rebase on their tracking branch
7   autosetuprebase = always
8 [commit]
9   # show diff in commit message editor
10   verbose = true
11 [diff]
12   # use (i)ndex, (w)orktree, (c)ommit, etc instead of a/ and b/
13   mnemonicprefix = true
14   # detect renames and copies
15   renames = copies
16   # use different color for moved code (default == zebra, currently)
17   colorMoved = default
18   # use vimdiff as difftool
19   tool = vimdiff
20 [difftool]
21   # do not prompt before invoking difftool
22   prompt = false
23 [fetch]
24   # delete tracking references and info about remote branches
25   # does not delete any branches
26   prune = true
27 [format]
28   # show a lot of info by default
29   pretty=fuller
30 [grep]
31   # show linenumber (-n)
32   lineNumber = true
33 [log]
34   # show short commit sha
35   abbrevCommit = true
36   # show short ref names but only in terminal
37   decorate = auto
38 [merge]
39   # only do fastforward merges
40   ff = only
41   # use vimdiff as mergetool
42   tool = vimdiff
43 [pretty]
44   longline = %C(auto)%h %<(52,trunc)%s (%aN, %GS %G?, %cr) %d
45   longlines = %C(auto)%h %<(52,trunc)%s (%aN, %GS %G?, %cr) %d %n%-w(0,8,8)%+b%-
46 [push]
47   # push to branch with same name on remote
48   default = current
49   # also push reachable annotated tags
50   followTags = true
51 [pull]
52   # rebase, don’t merge, local changes
53   rebase = true
54   # only accept fastforwards by default
55   ff = only
56 [rebase]
57   # when in a dirty worktree, automatically create a stash before and apply after rebasing
58   autoStash = true
59   # automatically squash marked commits (squash! …, fixup! …)
60   autosquash = true
61 [rerere]
62   # don’t use rerere to resolve merge conflicts
63   enabled = false
64
65 [alias]
66   a  = add
67   aa = add --all
68   ai = add --interactive
69   ap = add --patch
70   au = add --update
71
72   b      = branch
73   br     = branch
74   bra    = branch --all
75
76   co  = checkout
77   cob = checkout -b
78
79   cp  = cherry-pick
80   cpa = cherry-pick --abort
81   cpc = cherry-pick --continue
82
83   c     = commit
84   ca    = commit --all
85   cm    = commit --message
86   cma   = commit --all --message
87   cmv   = commit --verbose
88   cmav  = commit --all --verbose
89   fix   = commit --all --fixup
90
91   diff  = diff --word-diff
92   d     = diff --word-diff
93   dc    = diff --cached
94   dlc   = diff --cached HEAD^
95   ds    = diff --staged
96   dr    = "!f() { git diff -w "$1"^.."$1"; }; f"
97   diffr = "!f() { git diff "$1"^.."$1"; }; f"
98
99   # grep on filename
100   f = "!git ls-files | grep -i"
101
102   g    = grep -Ii
103   gr   = grep -Ii
104   grep = grep -Ii
105
106   ls      = log --pretty=format:"%C(green)%h\\ %C(yellow)[%ad]%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
107   ll      = log --graph --topo-order --date=short --abbrev-commit --decorate --all --boundary --pretty=format:'%Cgreen%ad %Cred%h%Creset -%C(yellow)%d%Creset %s %Cblue[%cn]%Creset %Cblue%G?%Creset'
108   lll     = log --graph --topo-order --date=iso8601-strict --no-abbrev-commit --abbrev=40 --decorate --all --boundary --pretty=format:'%Cgreen%ad %Cred%h%Creset -%C(yellow)%d%Creset %s %Cblue[%cn <%ce>]%Creset %Cblue%G?%Creset'
109   lc      = "!f() { git ll "$1"^.."$1"; }; f"
110   lnc     = log --pretty=format:"%h\\ %s\\ [%cn]"
111   lo      = log --oneline
112   lp      = log --patch
113   fl      = log -u
114   filelog = log -u
115   lg      = log --graph --pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset" --abbrev-commit
116   lga     = log --graph --pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset" --abbrev-commit --all
117   # tag logs
118   taglog = "log --tags --simplify-by-decoration --pretty='format:%ci %d'"
119
120   pl  = pull
121   pla = pull --all
122
123   ps     = push
124   please = push --force-with-lease
125
126   rem  = remote
127   remp = remote prune
128   remu = remote update
129
130   rb  = rebase
131   rba = rebase --abort
132   rbc = rebase --continue
133   rbi = rebase --interactive
134
135   r   = reset
136   r1  = reset HEAD^
137   r2  = reset HEAD^^
138   rh  = reset --hard
139   rh1 = reset --hard HEAD^
140   rh2 = reset --hard HEAD^^
141
142   rs = restore
143
144   sl = stash list
145   sa = stash apply
146   ss = stash save
147
148   st = status --short
149
150   sw = switch
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