-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_gitconfig.tmpl
145 lines (126 loc) · 3.74 KB
/
dot_gitconfig.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# ~/.gitconfig
[core]
excludesfile = ~/.gitignore
pager = delta
editor = vim -f
quotepath = false
abbrev = 8
[user]
name = Andreas Zeidler
email = {{ .email }}
signingkey = FD67B2D64F8D37F5
[alias]
ai = add --interactive
ap = add --patch
b = branch --verbose --verbose
ba = branch --verbose --verbose --all
bc = branch --contains
br = branch --verbose --remotes
brc = branch --contains --remotes
cat = cat-file
changed = status --porcelain --untracked=no
changes = !git log --pretty=format:%h.. -1 CHANGES.* | xargs git log --first-parent --pretty=format:'- %s%n- %b%n'
ci = commit --verbose
cia = commit --verbose --amend
co = checkout
cp = cherry-pick
cv = cherry --verbose
d = diff
dc = diff --cached
dn = diff --numstat
egrep = grep -E
feta = fetch --all
greps = grep --recurse-submodules
heads = for-each-ref --format='%(upstream:trackshort)%(refname:short) %(color:green)%(upstream:short) %(color:red)%(upstream:track)' refs/heads
l = log --pretty=format:'%C(yellow)%h%C(reset) %G? %C(bold blue)%an%C(reset) %s%C(bold cyan)%d%C(reset) %C(green)%ar.%C(reset)%w(0,11,11)%+b'
lg = l --graph
l0 = log --format=%s -1
l1 = log --oneline --decorate
l1p = log --oneline --decorate --first-parent
last = for-each-ref --count=5 --sort=-committerdate --format='%(committerdate:short) %(color:blue)%(refname:short) %(color:green)%(upstream:track)' refs/heads
last-no-merged = for-each-ref --no-merged main --sort=committerdate --format='%(committerdate:short) %(color:blue)%(refname:short) %(color:green)%(upstream:track)' refs/heads
lf = log --follow
list-remotes = config --get-regexp ^remote
ll = log --patch
llf = log --patch --follow
lln = log --patch --numstat
llp = log --patch --first-parent
ln = log --numstat
lol = log --graph --decorate --pretty=oneline --abbrev-commit
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
lp = log --first-parent
ls = ls-files
m = merge --no-ff
p = pull --ff
pop = stash pop
pure = pull --rebase
# quote / unquote a sh command, see https://stackoverflow.com/a/39616600
py2isms = "!git grep \"\\([ (]u[\\\"']\\|class .*(object)\\| six\\|super([^)]\\|__future__\\)\" #"
r = remote
rbc = rebase --continue
rbi = rebase --interactive
reha = reset --hard
rp = reset --patch
s = status --short --branch
sha = log -1 --format=format:%h
st = status --short --branch
stak = stash save --keep-index
state = "!git heads | grep -v '^[<=]'; git stash list | cat"
stow = stash show --patch
stui = status --short --branch --untracked-files --ignored
sub = submodule
sui = submodule update --init
tc = tag --contains
upstream = rev-parse --abbrev-ref --symbolic-full-name @{u}
watch = !git ls-files | xargs fswatch -o | xargs -I@ -n1
wd = diff --word-diff --color-words
wdc = diff --word-diff --color-words --cached
[branch]
autosetupmerge = true
autosetuprebase = remote
[clean]
requireForce = False
[color]
diff = auto
branch = auto
status = auto
[commit]
gpgSign = true
{{- if eq .environment "zon" }}
prefixBranches = ^ZO-[0-9]*
{{- end }}
[delta]
navigate = true # use n and N to move between diff sections
light = false # set to true if you're in a terminal w/ a light background color (e.g. the default macOS terminal)
line-numbers = true
hyperlinks = true
zero-style = dim syntax
[diff]
renames = true
colorMoved = default
[diff "spaceman-diff"]
command = spaceman-diff
[init]
defaultBranch = "main"
{{- if eq .environment "zon" }}
templatedir = ~/.config/git/templates
{{- end }}
[interactive]
diffFilter = delta --color-only
[merge]
log = true
conflictstyle = diff3
[push]
default = current
[rebase]
stat = true
[rerere]
enabled = true
[tag]
forceSignAnnotated = true
gpgSign = true
[trim]
bases = main
delete = merged:*, stray
[submodule]
recurse = true