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