mirrored from https://bitbucket.org/childnode/marcel.git
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
263 lines (234 loc) · 8.31 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
[color]
diff = auto
status = auto
branch = auto
grep = auto
[alias]
#st = status ##see st below == status -s
ci = commit
co = checkout
f = fetch --all
l = !git lg
la = !git lgr
ll = !git lgs
lla = !git lgsr
nffmerge = merge --no-ff --no-commit
ffmerge = merge --ff-only
filehist = log --branches --graph --decorate=full --remotes --follow
tags = tag -ln
br = branch -vv
brr = branch -avv
unstage = reset HEAD --
untrack = rm --cached
ignorelocal = update-index --assume-unchanged
unignorelocal = update-index --no-assume-unchanged
wtm = show-merges
wtmr = show-remote-merges
gcp = gc --aggressive --prune=0
track = branch --set-upstream
poh = push -u origin HEAD
pohtags = push origin refs/tags/*
pohf = push --force -u origin HEAD
pohftags = push --force origin refs/tags/*
nm = branch --no-merge
puff = pull --ff-only
puffs = pull --ff-only --recurse-submodules
pulls = pull --recurse-submodules
pur = pull --rebase
purp = pull --rebase=preserve
purs = pull --rebase=preserve --recurse-submodules
p = puffpu origin HEAD
pr = purepu origin HEAD
cpu = puffpu --commit origin HEAD
cpru = purepu --commit origin HEAD
d = diff -b
dchk = !git d --check
dh = !git d HEAD --
dh1 = !git d HEAD~ HEAD --
sm = submodule
limbo = fsck --unreachable
up = !gitup .
####################################################################################################
## some nice aliases from https://developer.atlassian.com/blog/2015/05/the-power-of-git-subtree/
####################################################################################################
# the acronym stands for "subtree add" // original `sba`
sadd = "!f() { git subtree add --prefix $2 $1 $3 --squash; }; f"
# the acronym stands for "subtree update" // original `sbu`
sup = "!f() { git subtree pull --prefix $2 $1 $3; }; f"
supq = "!f() { git subtree pull --prefix $2 $1 $3 --squash; }; f"
####################################################################################################
## some nice aliases from https://stackoverflow.com/a/9074343/529977
####################################################################################################
lg1 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
lg2 = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all
####################################################################################################
## some nice aliases from http://durdn.com/blog/2012/11/22/must-have-git-aliases-advanced-examples/
####################################################################################################
ls = log --decorate --oneline
ls2 = log --decorate --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]"
ls3 = log --pretty=format:"%h\\ %s\\ [%cn]"
lsd = log --decorate --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --date=short
lsdr = log --decorate --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --date=relative
lsa = !git ls --ancestry-path
lss = !git ls --stat
lssa = !git lss --ancestry-path
lsns = !git ls --numstat
lsnsa = !git lss --ancestry-path
lg = log --branches --graph --decorate
lgs = !git lg --stat
lgsr = !git lgs --remotes
lga = !git lg --ancestry-path
lgr = !git lg --remotes
lgar = !git lga --remotes
lgra = !git lgar
filelog = log -u
dl = "!git ll -1"
dlc = diff --cached HEAD^
dr = "!f() { git diff "$1"^.."$1"; }; f"
lc = "!f() { git ll "$1"^.."$1"; }; f"
diffr = "!f() { git diff "$1"^.."$1"; }; f"
find = "!git ls-files | grep -i"
grepi = grep -Ii
gr = grep
gri = "!git grepi"
gra = "!f() { A=$(pwd) && TOPLEVEL=$(git rev-parse --show-toplevel) && cd $TOPLEVEL && git grep --full-name -In $1 | xargs -I{} echo $TOPLEVEL/{} && cd $A; }; f"
aliases = "!git config -l | grep alias | cut -c 7-"
#done = "!f() { git branch | grep "$1" | cut -c 3- | grep -v done | xargs -I{} git branch -m {} done-{}; }; f"
## called it 'ignore' in my version
assume = update-index --assume-unchanged
unassume = update-index --no-assume-unchanged
assumed = "!git ls-files -v | grep ^h | cut -c 3-"
unassumeall = "!git assumed | xargs git update-index --no-assume-unchanged"
assumeall = "!git st -s | awk {'print $2'} | xargs git assume"
lasttag = describe --tags --abbrev=0
lt = describe --tags --abbrev=0
ours = "!f() { git co --ours $@ && git add $@; }; f"
theirs = "!f() { git co --theirs $@ && git add $@; }; f"
cp = cherry-pick
st = status -s
cl = clone
co = checkout
# br = branch
dw = !git d --word-diff
dc = !git d --cached
r = reset
r1 = reset HEAD^
r2 = reset HEAD^^
rh = reset --hard
rh1 = reset HEAD^ --hard
rh2 = reset HEAD^^ --hard
svnr = svn rebase
svnd = svn dcommit
svnl = svn log --oneline --show-commit
sl = stash list
sa = stash apply
ss = stash save
stree = subtree
smu = submodule update
smui = submodule update --init
smi = "!git smui"
spurm = "!f() { git f && git rebase origin/master; }; f"
pohm = push -u origin HEAD:master
smur = submodule update --remote
pohm = push origin HEAD:master
tagsref = !git tags --format \"%(objecttype) %(*refname) %(objectname) @ %(*objectname)\"
desc = describe
descr = describe
####################################################################################################
# [filter "lfs"]
# process = git-lfs filter-process
# required = true
# clean = git-lfs clean -- %f
# smudge = git-lfs smudge -- %f
[user]
useConfigOnly = true
name = Marcel 'childNo͡.de' Trautwein
email = ""
[diff]
tool = p4merge
submodule=log
[difftool]
prompt = false
[merge]
tool = p4merge
branchdesc = true
log = true ## defaults to 20
[mergetool]
prompt = true
keepTemporaries = false
keepBackup = false
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[difftool "Kaleidoscope"]
cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
[mergetool "Kaleidoscope"]
cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot
[difftool "bcomp"]
trustExitCode = true
cmd = "/usr/local/bin/bcomp" "$LOCAL" "$REMOTE"
[mergetool "bcomp"]
trustExitCode = true
cmd = "/usr/local/bin/bcomp" "$BASE" "$MERGED"
[mergetool "bcomp_pro"]
trustExitCode = true
cmd = "/usr/local/bin/bcomp" "$LOCAL" "$REMOTE" "$BASE" "$MERGED"
[difftool "p4merge"]
cmd = "p4merge \"$LOCAL\" \"$REMOTE\""
[mergetool "p4merge"]
cmd = "p4merge \"$BASE\" \"$REMOTE\" \"$LOCAL\" \"$MERGED\""
[core]
autocrlf = input
safecrlf = warn
excludesfile = ~/.gitignore_global
## defaults:
# whitespace = blank-at-eol,blank-at-eof,space-before-tab
# whitespace = -indent-with-non-tab,-tab-in-indent,-cr-at-eol
## hint: indent-with-non-tab means "prefer tabs, not prefer spaces!!"
## hint: -trailing-space == -blank-at-eol,-blank-at-eof
## hint: tabwidth=8
whitespace = tab-in-indent
[apply]
whitespace = fix
[branch]
autosetupmerge = true
[fetch]
recurseSubmodules = true
[status]
submoduleSummary = true
branch = true
relativePaths = false
[tag]
forceSignAnnotated = true
sort = "-version:refname"
[versionsort]
prereleaseSuffix = "-rc"
[push]
default = simple
followTags = true
recurseSubmodules = on-demand
[url "https://github.com/"]
insteadOf = git://github.com/
insteadOf = git://github.com:
insteadOf = [email protected]:
[url "[email protected]:"]
pushInsteadOf = git://github.com/
pushInsteadOf = git://github.com:
pushInsteadOf = https://github.com/
[url "[email protected]:"]
pushInsteadOf = git://gist.github.com/childnode/
pushInsteadOf = git://gist.github.com:childnode/
pushInsteadOf = https://gist.github.com/childnode/
pushInsteadOf = https://gist.github.com/
[url "https://gitorious.org"]
insteadOf = git://gitorious.org/
insteadOf = git://gitorious.org:
[url "git://gitorious.org"]
pushInsteadOf = https://gitorious.org
[url "[email protected]:"]
insteadOf = https://bitbucket.org
[pull]
rebase = preserve