]> git.netwichtig.de Git - user/henk/vcsh/git.git/blob - .config/git/config
Add pretty format
[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 [diff]
13   # use (i)ndex, (w)orktree, (c)ommit, etc instead of a/ and b/
14   mnemonicprefix = true
15   # detect renames and copies
16   renames = copies
17   # use different color for moved code (default == zebra, currently)
18   colorMoved = default
19   # use vimdiff as difftool
20   tool = vimdiff
21 [difftool]
22   # do not prompt before invoking difftool
23   prompt = false
24 [fetch]
25   # delete tracking references and info about remote branches
26   # does not delete any branches
27   prune = true
28 [format]
29   # show a lot of info by default
30   pretty=fuller
31 [grep]
32   # show linenumber (-n)
33   lineNumber = true
34 [log]
35   # show short commit sha
36   abbrevCommit = true
37   # show short ref names but only in terminal
38   decorate = auto
39 [merge]
40   # only do fastforward merges
41   ff = only
42   # use vimdiff as mergetool
43   tool = vimdiff
44 [pretty]
45   longline = '%C(auto)%h %<(52,trunc)%s (%aN, %GS %G?, %cr) %d'
46   longlines = '%C(auto)%h %<(52,trunc)%s (%aN, %GS %G?, %cr) %d %n%-w(0,8,8)%+b%-'
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
77   co  = checkout
78   cob = checkout -b
79
80   cp  = cherry-pick
81   cpa = cherry-pick --abort
82   cpc = cherry-pick --continue
83
84   c     = commit
85   ca    = commit --all
86   cm    = commit --message
87   cam   = commit --all --message
88   fix   = commit --all --fixup
89
90   diff  = diff --word-diff
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   ls      = log --pretty=format:"%C(green)%h\\ %C(yellow)[%ad]%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
106   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'
107   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'
108   lc      = "!f() { git ll "$1"^.."$1"; }; f"
109   lnc     = log --pretty=format:"%h\\ %s\\ [%cn]"
110   lo      = log --oneline
111   lp      = log --patch
112   fl      = log -u
113   filelog = log -u
114   lg      = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
115   lga     = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --all
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   rb  = rebase
130   rba = rebase --abort
131   rbc = rebase --continue
132   rbi = rebase --interactive
133
134   r   = reset
135   r1  = reset HEAD^
136   r2  = reset HEAD^^
137   rh  = reset --hard
138   rh1 = reset --hard HEAD^
139   rh2 = reset --hard HEAD^^
140
141   rs = restore
142
143   sl = stash list
144   sa = stash apply
145   ss = stash save
146
147   st = status --short
148
149   sw = switch
150
151   # add subtree
152   sba = "!f() { git subtree add --prefix $2 $1 master --squash; }; f"
153   # update/pull subtree
154   sbu = "!f() { git subtree pull --prefix $2 $1 master --squash; }; f"
155
156   # initial empty commit
157   empty = "!git commit -am\"[empty] Initial commit\" --allow-empty"
158
159   wl = worktree list
160
161   serve = daemon --reuseaddr --verbose --base-path=. --export-all ./.git