-
Notifications
You must be signed in to change notification settings - Fork 78
/
gitconfig
286 lines (263 loc) · 9.83 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
[user]
name = Matthew McCullough
email = matthew@mccullough.io
username = matthewmccullough
signingkey = FC9C6E47
[color]
# ui = true is a superset of all the more specific color options
# as documented at http://book.git-scm.com/5_customizing_git.html
# When set to always, always use colors in all git commands which are capable of colored output.
# When false, never. When set to true or auto, use colors only when the output is to the terminal.
# When more specific variables of color.* are set, they always take precedence over this setting.
# Defaults to false.
ui = auto
# diff = auto
# status = auto
# branch = auto
[color "branch"]
#current = yellow reverse
#local = yellow
#remote = green
[color "diff"]
#meta = yellow bold
#frag = magenta bold
#old = red bold
#new = green bold
[color "status"]
#added = yellow
#changed = green
#untracked = cyan
[gui]
recentrepo = ~/Documents/Temp/Scratch/hello/hgw1
[core]
excludesfile = ~/.gitignore
quotepath = false
autocrlf = input
editor = vim
[alias]
ad = difftool --tool=araxis --dir-diff
ads = difftool --tool=araxis --dir-diff --staged
br = branch -a
s = status -u -s
cl = log --stat -C -2
c = commit
co = checkout
d = diff --color-words
dh = diff HEAD
dc = diff --staged
dw = diff --word-diff
dcw = diff --color-words
dm = !git diff | mate
dv = !git diff | vim
who = shortlog -s --
ph = push
pl = pull
lp = log -p
lod = log --oneline --decorate
lg = log --graph
lpo = log --pretty=oneline --abbrev-commit --graph --decorate --all
l1 = log --graph --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
l2 = log --graph --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
l3 = log --graph --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
spull = !git-svn fetch && git-svn rebase
spush = !git-svn dcommit
sync = !git pull && git push
es = !git pull --rebase && git push
lf = log --pretty=fuller
ignorechanges = update-index --assume-unchanged
noticechanges = update-index --no-assume-unchanged
gc-ap = gc --aggressive --prune
listconf = config --global --list
cam = commit -a -m
lsm = log -M --stat
hse = log --stat -5
diffall = diff HEAD
logr = log -M
logr2 = log --stat -M -2
logit = log --stat -M
scrub = !git reset --hard && git clean -fd
pubdev = !git pub checkout master && git pull && git checkout dev && git rebase master && git checkout master && git merge dev && git wtf
pub = push -u origin
cs = status
rv = remote -v
lwr = log --stat -C
pur = pull --rebase
whatis = show -s --pretty='tformat:%h (%s, %ad)' --date=short
orphank = !gitk --all `git reflog | cut -c1-7`&
orphanl = !git log --pretty=oneline --abbrev-commit --graph --decorate `git reflog | cut -c1-7`
k = !exec gitk --all&
testecho1 = !sh -c 'echo with slash: zero=$0 one=$1 two=$2' -
# te1 RESULT: with slash: zero=- one=A two=B
testecho2 = !sh -c 'echo without slash: zero=$0 one=$1 two=$2'
# te2 RESULT: without slash: zero=A one=B two=C
st = status
l = log --stat -C
ll = log --stat -C -3
servehere = daemon --verbose --informative-errors --reuseaddr --export-all --base-path=. --enable=receive-pack
purgeme = !git clean -fd && git reset --hard
prunenow = gc --prune=now
ri = rebase --interactive --autosquash
lol = log --pretty=oneline --graph --abbrev-commit --all
blg = log --graph --decorate --all --abbrev-commit --pretty=oneline
slog = log --graph --simplify-by-decoration --all --abbrev-commit --pretty=oneline
lgso = log --graph --date=short --pretty=format:'%C(yellow)%h%Creset %cn%x09%cd %s%C(green bold)%d'
ro = !git fetch origin && git reset --hard origin/master
shorten = "!sh -c 'curl -i http://git.io -F url=$1' -"
pushnotes = !sh -c 'git push $1 refs/notes/*' -
fetchnotes = !sh -c 'git fetch $1 refs/notes/*:refs/notes/*' -
showignored = clean -ndX
showignored2 = ls-files --others --ignored --exclude-standard
showuntracked = ls-files --others --exclude-standard
rmmissing = !git rm $(git ls-files --deleted)
mergekeepoursonly = merge -s ours
redocommit = reset --soft HEAD^
listunstaged = diff --name-status
liststaged = diff --name-status --staged
listhistory = log --name-status
logn = log --oneline --name-only
busypeople = shortlog -6
busythisweek = shortlog --since=one.week.ago
configpushtracking = config push.default tracking
configpushnothing = config push.default nothing
configpushtracking = config push.default matching
configpushcurrent = config push.default current
# Other alias ideas that don't quite work yet
#testnewrepodoesntwork1 = !echo git init $1 && echo cd $1
#testnewrepodoesntwork2 = !sh -c 'git init $1; echo hi' -
#testnewrepodoesntwork3 = "!f() { git init $1}; f"
nr = "!sh -c 'git init $0'"
echoparam1 = "!sh -c 'echo $0'"
#testshfunction = "!function gitme() { git init $1; cd $1; }; gitme"
fixup = "!sh -c 'git commit -m \"fixup! $(git log -1 --format='\\''%s'\\'' $@)\"' -"
squash = "!sh -c 'git commit -m \"squash! $(git log -1 --format='\\''%s'\\'' $@)\"' -"
ccfq = "!sh -c 'git add $1 && git commit -m\"Placeholder\"' -"
logme = log --author=Matthew --stat -C
cob = checkout -b
sno = show --name-only
logsimple = log --graph --abbrev-commit --pretty=oneline --all --decorate
gwcl = log --graph --all --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
rlog = log --color-words --stat -3
lm = log --stat -M
# Legit
legitsync = !legit sync \"$@\"
legitswitch = !legit switch \"$@\"
legitbranches = !legit branches
legitsprout = !legit sprout \"$@\"
legitunpublish = !legit unpublish \"$@\"
legitharvest = !legit harvest \"$@\"
legitpublish = !legit publish \"$@\"
legitgraft = !legit graft \"$@\"
#Searches
findjuniodeletes = log --author=Junio --diff-filter=D --since=2.years.ago
#https://git.wiki.kernel.org/index.php?title=Aliases
aliases = !git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /'
graphviz = "!f() { echo 'digraph git {' ; git log --pretty='format: %h -> { %p }' \"$@\" | sed 's/[0-9a-f][0-9a-f]*/\"&\"/g' ; echo '}'; }; f"
abbr = "!sh -c 'git rev-list --all | grep ^$1 | while read commit; do git --no-pager log -n1 --pretty=format:\"%H %ci %an %s%n\" $commit; done' -"
oneline ="!_() { $(test $# -eq 0 && echo xargs -L1) git log --no-walk --decorate --oneline \"$@\"; }; _"
tips = "!_() { t=$(git rev-list --no-merges --max-count=1 \"$@\"); if test -n \"$t\"; then echo $t; _ \"$@\" ^$t; fi; }; _"
empty-tree-sha1 = hash-object -t tree /dev/null
whitespaceviolations = "!git diff --check $(git empty-tree-sha1)"
patchforthis = "!git diff -p $(git empty-tree-sha1)"
tagcontains = git tag -l --contains HEAD
cc-cache = "config --global credential.helper 'cache --timeout=300'"
cc-off = "config --unset --global credential.helper"
cc-helperosx = "config --global credential.helper 'osxkeychain'"
cc-helperwin = "config --global credential.helper 'wincred'"
cc-helperlin = "config --global credential.helper '/pathto/git-credential-gnome-key'"
logm = log --stat -M
logcpy = log --stat -1 -C -C
pushsvn = svn dcommit
pullsvn = svn rebase
nfjsunpushed = log origin/master..master --oneline
rtheirs = !git checkout --theirs ./ && git add . && git rebase --continue
logfive = log --graph --pretty=oneline --abbrev-commit --decorate --all -5
noderelnotes = git log --graph --pretty=format:'%h%d %s (%an)'
configsimplelog = config format.pretty oneline
listignored = ls-files --others -i --exclude-standard
me = !git config --get user.name && git config --get user.email
[apply]
whitespace = nowarn
[rerere]
enabled = true
[difftool]
prompt = false
tool = araxis
[difftool "myaraxis"]
cmd = araxisgitdiff ONE $LOCAL THREE FOUR $REMOTE
[diff]
tool = araxis
# renames = true
[mergetool]
prompt = false
keepBackup = false
[mergetool "myaraxis"]
cmd = araxisgitmerge $PWD/$REMOTE $PWD/$BASE $PWD/$LOCAL $PWD/$MERGED
[merge]
tool = araxis
[branch]
# Automatically set up pull to be --rebase
#autosetuprebase = always
[url "git://github.com/"]
insteadOf = "ghg://"
pushInsteadOf = "ghg://"
# Example: git clone ghg://ntschutta/emacs
[url "git://github.com/matthewmccullough/"]
insteadOf = "ghgm://"
pushInsteadOf = "ghgm://"
# Example: git clone ghgm://hellogitworld
[url "git@github.com:"]
insteadOf = "ghs://"
pushInsteadOf = "ghs://"
[url "git@github.com:matthewmccullough/"]
insteadOf = "ghsm://"
pushInsteadOf = "ghsm://"
[url "https://github.com/"]
insteadOf = "ghh://"
pushInsteadOf = "ghh://"
[url "https://github.com/matthewmccullough/"]
insteadOf = "ghhm://"
pushInsteadOf = "ghhm://"
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[difftool "p4merge"]
cmd = \"/Applications/p4merge.app/Contents/Resources/launchp4merge $LOCAL $REMOTE\"
[http]
# proxy=http://something
[hub]
protocol = https
[gist]
private = yes
browse = yes
#[credential]
# helper = cache --timeout=300
[push]
default = matching
[difftool "Kaleidoscope"]
cmd = ksdiff --partial-changeset --relative-path \"$MERGED\" -- \"$LOCAL\" \"$REMOTE\"
[mergetool "Kaleidoscope"]
cmd = ksdiff --merge --output \"$MERGED\" --base \"$BASE\" -- \"$LOCAL\" --snapshot \"$REMOTE\" --snapshot
trustExitCode = true
[filter "media"]
required = true
clean = git media clean %f
smudge = git media smudge %f
[gh]
protocol = https
#[github]
# user = matthewmccullough
#[credential]
# helper = osxkeychain
[github]
user = matthewmccullough
[credential]
helper = osxkeychain
[filter "lfs"]
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
[ghi]
token = !security find-internet-password -a matthewmccullough -s github.com -l 'ghi token' -w
[pull]
rebase = true