-
Notifications
You must be signed in to change notification settings - Fork 1
/
dot_gitconfig.tmpl
195 lines (180 loc) · 4.63 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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
[init]
defaultBranch = main
[user]
name = {{ .git.name }}
username = {{ .git.username }}
email = {{ .git.email }}
signingkey = {{ .git.signingkey }}
[core]
longpaths = true
editor = nvim
ignorecase= false
pager =
quotepath = false
# Normalizing Line Endings
eol = lf
autocrlf = input
safecrlf = true
[commit]
gpgsign = {{ .git.gpgsign | default "true" }}
[gpg]
program = {{ if ( or ( eq .chezmoi.os "darwin" ) ( eq .chezmoi.os "linux" )) }}gpg{{ else if eq .chezmoi.os "windows" }}C:\\Program Files (x86)\\GnuPG\\bin\\gpg.exe{{ end }}
[filter "lfs"]
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
# smudge = git-lfs smudge --skip -- %f
process = git-lfs filter-process
# process = git-lfs filter-process --skip
[credential]
helper = store
[color]
ui = auto
[color "branch"]
current = yellow bold
local = green bold
remote = cyan bold
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
whitespace = red reverse
[color "status"]
added = green bold
changed = yellow bold
untracked = red bold
[diff]
tool = vimdiff
[difftool]
prompt = false
[alias]
######## add ########
a = add
ai = add -i
aa = add -A
######## branch ########
b = branch
ba = branch -a
bd = branch -d #branch delete
bm = branch -m #branch rename
br = branch -r #branch remote
######## commit ########
c = commit
ca = commit --amend
can = commit --amend --no-edit
cm = commit --message
cam = commit --message --amend
ci = commit --interactive
######## clone ########
cl = clone
cl1 = clone --depth 1
######## diff ########
d = diff
dc = diff --cached
dk = diff --check
dck = diff --cached --check
dt = difftool
dct = difftool --cached
dHH = diff HEAD^ HEAD
######## fetch ########
f = fetch
fo = fetch origin
fu = fetch upstream
######## grep ########
g = grep
######## log ########
l = log --graph --oneline -15
ll = log --graph --oneline -40
la = log --graph --oneline --all
lg = log --graph --pretty=format:'%C(yellow)%h%Creset %ad |%C(red)%d%Creset %s %Cgreen(%cr)%Creset %C(bold blue)<%an>%Creset' --abbrev-commit --date=short -15
lgl = log --graph --pretty=format:'%C(yellow)%h%Creset %ad |%C(red)%d%Creset %s %Cgreen(%cr)%Creset %C(bold blue)<%an>%Creset' --abbrev-commit --date=short -40
lga = log --graph --pretty=format:'%C(yellow)%h%Creset %ad |%C(red)%d%Creset %s %Cgreen(%cr)%Creset %C(bold blue)<%an>%Creset' --abbrev-commit --date=short
######## merge ########
m = merge
ma = merge --abort
mc = merge --continue
me = merge --edit #merge and edit message
mn = merge --no-commit #merge but don't commit
ms = merge --skip
######## checkout ########
o = checkout #checkout branch
ob = checkout -b #checkout new branch
om = checkout main
omm = checkout master
od = checkout develop
os = checkout source
oh = checkout hotfix
or = checkout release
of = checkout feature
######## push ########
ps = push
psf = push -f
psu = push -u
pst = push --tags
pso = push origin
psfo = push -f origin
psuo = push -u origin
psao = push --all origin
psom = push origin main
psaom = push --all origin main
psfom = push -f origin main
psuom = push -u origin main
######## pull ########
pl = pull
plr = pull --rebase
plo = pull origin
plor = pull --rebase origin
plom = pull origin main
plrom = pull --rebase origin main
plu = pull upstream
plum = pull upstream main
pbum = pull --rebase upstream main
######## remote ########
r = remote
ra = remote add
rr = remote rm
rv = remote -v
rn = remote rename
rp = remote prune
rs = remote show
rao = remote add origin
rau = remote add upstream
rro = remote remove origin
rru = remote remove upstream
rso = remote show origin
rsu = remote show upstream
rpo = remote prune origin
rpu = remote prune upstream
######## rebase ########
rb = rebase
rba = rebase --abort
rbc = rebase --continue
rbi = rebase --interactive
rbsk = rebase --skip
######## reset ########
re = reset
rh = reset HEAD
reh = reset --hard
rem = reset --mixed
res = reset --soft
rehh = reset --hard HEAD
remh = reset --mixed HEAD
resh = reset --soft HEAD
rehom = reset --hard origin/main
######## rm ########
rmf = rm -f
rmrf = rm -r -f
######## status ########
s = status
ss = status -s -b
######## sub ########
sub = submodule
subi = submodule init
subu = submodule update
######## tag ########
t = tag
td = tag -d
######## show ########
w = show
wp = show -p