-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.gitconfig
317 lines (291 loc) · 8.78 KB
/
.gitconfig
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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
[user]
email = [email protected]
name = Aditya Singh Tomar
[core]
[web]
browser = google-chrome
[instaweb]
httpd = apache2 -f
[rerere]
enabled = 1
autoupdate = 1
[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
[delta]
features = line-numbers decorations
line-numbers = true
[delta "decorations"]
minus-style = red bold normal
plus-style = green bold normal
minus-emph-style = white bold red
minus-non-emph-style = red bold normal
plus-emph-style = white bold green
plus-non-emph-style = green bold normal
file-style = yellow bold none
file-decoration-style = yellow box
hunk-header-style = magenta bold
hunk-header-decoration-style = magenta box
minus-empty-line-marker-style = normal normal
plus-empty-line-marker-style = normal normal
line-numbers-right-format = "{np:^4}│ "
[gitflow "prefix"]
versiontag = v
[sequence]
editor = interactive-rebase-tool
[alias]
a = add --all
ac = apply --check
ahead = !git rev-list --right-only --count $(git bu)...HEAD
ai = add -i
aliases = !git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /' | sort # list all aliases
aliases = !git config -l | grep alias | cut -c 7-
ama = am --abort
amr = am --resolved
ams = am --skip
ap = apply
as = apply --stat
assume = update-index --assume-unchanged
assumeall = !git status -s | awk {'print $2'} | xargs git assume
assumed = !git ls -v | grep ^h | cut -c 3-
b = branches
ba = branch -a
bare = !sh -c 'git symbolic-ref HEAD refs/heads/$1 && git rm --cached -r . && git clean -xfd' -
bc = rev-parse --abbrev-ref HEAD
bd = branch -d
bdd = branch -D
behind = !git rev-list --left-only --count $(git bu)...HEAD
br = branch
br = branch -r
branch-name = !git cb # alias to "cb" alias
bs = !git-branch-status
bu = !git rev-parse --abbrev-ref --symbolic-full-name "@{u}"
bump = !sh -c 'git commit -am \"Version bump v$1\" && git psuoc && git release $1' -
c = commit
ca = commit -a
cad = commit -a --amend
cam = commit -am
cb = !git branch | grep ^* | cut -d' ' -f2
cd = commit --amend
ced = commit --allow-empty --amend
cem = commit --allow-empty -m
ci = commit
cie = commit --allow-empty-message -m ''
cl = clone
cld = clone --depth 1
clg = !sh -c 'git clone git://github.com/$1 $(basename $1)' -
clgp = !sh -c 'git clone [email protected]:$1 $(basename $1)' -
clgu = !sh -c 'git clone [email protected]:$(git config --get user.username)/$1 $1' -
cloner = clone --recursive
cm = commit -m
co = checkout
cp = cherry-pick
cpa = cherry-pick --abort
cpc = cherry-pick --continue
d = diff
dc = diff --cached
dck = diff --cached --check
dct = difftool --cached
delete-tag = "!f() { git tag -d $1; git push origin :refs/tags/$1; }; f"
df = diff -C --color-words
dk = diff --check
dp = diff --patience
dt = difftool
f = fetch
find = !sh -c 'git lg --grep="$@"' # search for a string in the commit message log
fixup = !sh -c 'git commit --fixup=$1' -
fk = fsck
fo = fetch origin
fp = format-patch
fu = fetch upstream
g = grep -p
human = name-rev --name-only --refs=refs/heads/*
info = !sh -c 'git-info' - # requires https://github.com/gitbits/git-info
l = log --oneline
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --all
lg = log --oneline --graph --decorate
ls = ls-files
lsf = !git ls-files | grep -i
m = merge
ma = merge --abort
mc = merge --continue
merged = !sh -c 'git o master && git plom && git bd $1 && git rpo' -
ms = merge --skip
o = checkout
ob = checkout -b
oldest-ancestor = !zsh -c 'diff --old-line-format='' --new-line-format='' <(git rev-list --first-parent "${1:-master}") <(git rev-list --first-parent "${2:-HEAD}") | head -1' -
om = checkout master
opr = !sh -c 'git fo pull/$1/head:pr-$1 && git o pr-$1'
ours = "!f() { git checkout --ours $@ && git add $@; }; f"
pb = pull --rebase
pbo = pull --rebase origin
pboc = !git pull --rebase origin $(git bc)
pbom = pull --rebase origin master
pbuc = !git pull --rebase upstream $(git bc)
pbum = pull --rebase upstream master
pl = !git pull --rebase origin $(git cb)
pl = pull
plo = pull origin
ploc = !git pull origin $(git bc)
plom = pull origin master
plu = pull upstream
pluc = !git pull upstream $(git bc)
plum = pull upstream master
pr = prune -v
prune-all = !git remote | xargs -n 1 git remote prune
prune-local = !git branch --merged | grep -v master | grep -v dev | xargs -n 1 git branch -d
ps = !git push origin $(git cb)
ps = push
psao = push --all origin
psaoc = !git push --all origin $(git bc)
psaom = push --all origin master
psdc = !git push origin :$(git bc)
psf = push -f
psfo = push -f origin
psfoc = !git push -f origin $(git bc)
psfom = push -f origin master
pso = push origin
psoc = !git push origin $(git bc)
psoh = push origin HEAD
psom = push origin master
pst = push --tags
psu = push -u
psuo = push -u origin
psuoc = !git push -u origin $(git bc)
psuom = push -u origin master
push-hash = !sh -c 'git push origin $1:refs/heads/$(git cb)' - # requires a SHA or the remote branch will be deleted!!
r = remote
ra = remote add
rao = remote add origin
rau = remote add upstream
rb = rebase
rba = rebase --abort
rbc = rebase --continue
rbi = rebase --interactive
rbs = rebase --skip
re = reset
reh = reset --hard
rehh = reset --hard HEAD
rehom = reset --hard origin/master
release = !sh -c 'git tag v$1 && git pst' -
rem = reset --mixed
remh = reset --mixed HEAD
res = reset --soft
reset-tags = "!f() { git tag -l | xargs git tag -d; git fetch; }; f"
resh = reset --soft HEAD
rh = reset HEAD
ri = rebase --interactive --autosquash --rebase-merges
rmf = rm -f
rmrf = rm -r -f
rn = remote rename
rp = remote prune
rpo = remote prune origin
rpu = remote prune upstream
rr = remote rm
rro = remote remove origin
rru = remote remove upstream
rs = remote show
rso = remote show origin
rsu = remote show upstream
rv = remote -v
s = status
sa = stash apply
save = stash save -u
sb = status -s -b
sc = stash clear
sd = stash drop
serve = !git daemon --reuseaddr --verbose --base-path=. --export-all ./.git
serve = daemon --reuseaddr --verbose --base-path=. --export-all ./.git
sl = stash list
snap = !git stash save 'snapshot: $(date)' && git stash apply 'stash@{0}'
sp = stash pop
squash = !sh -c 'git commit --squash=$1' -
srch = !sh -c 'git grep "$@" $(git rev-list --all)' # search for a string in all commits
ss = stash save
ssk = stash save -k
st = !git stash list | wc -l 2>/dev/null | grep -oEi '[0-9][0-9]*'
st = status
subadd = !sh -c 'git submodule add git://github.com/$1 $2/$(basename $1)' -
subpull = !git submodule foreach git pull --tags -f origin master
subrepo = !sh -c 'git filter-branch --prune-empty --subdirectory-filter $1 master' -
subrm = !sh -c 'git submodule deinit -f -- $1 && rm -rf .git/modules/$1 && git rm -f $1' -
subup = submodule update --init --recursive
svnd = svn dcommit
svnl = svn log --oneline --show-commit
svnr = svn rebase
sw = stash show
t = tag
td = tag -d
theirs = "!f() { git checkout --theirs $@ && git add $@; }; f"
unassume = update-index --no-assume-unchanged
unassumeall = !git assumed | xargs git unassume
unrelease = !sh -c 'git tag -d v$1 && git pso :v$1' -
w = show
who = shortlog -s --
whois = !sh -c 'git log -i -1 --author=\"$1\" --pretty=\"format:%an <%ae>\"' -
wp = show -p
wr = show -p --no-color
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[core]
#editor = st -n -w # Sublime Text
#editor = code -n -w # VS Code
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
ignorecase = false
excludesfile = /home/adi/.gitignore_global
[color]
ui = true
[branch]
autosetuprebase = always
[dude]
# notify-command = growlnotify -n \"$app_name\" -s --image \"$ICON_PATH\" -m \"$DESCRIPTION\" \"$TITLE\"
# icon ~/.git-dude/github_32.png
# notify-command = osascript -e \"display notification \\\"$DESCRIPTION\\\" with title \\\"$TITLE\\\"\"
notify-command = osascript -e \"display notification \\\"$DESCRIPTION\\\" with title \\\"$TITLE\\\" sound name \\\"Hero\\\"\"
[push]
default = simple
[credential]
helper = osxkeychain
[filter "media"]
clean = git-media-clean %f
smudge = git-media-smudge %f
[instaweb]
local = false
port = 8080
httpd = webrick
[filter "lfs"]
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f
[fetch]
prune = true
[pull]
rebase = true
ff = only
[merge]
ff = false
[grep]
lineNumber = true