-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
193 lines (149 loc) · 4.68 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
[user]
name = Joel Kottas
email = [email protected]
[core]
editor = vim
abbrev = 16
excludesfile = ~/.gitignore
pager = less -XFR
whitespace = space-before-tab,trailing-space
ignorecase = false
[add]
ignoreErrors = true
[merge]
tool = vimdiff
conflictstyle = diff3
stat = true
renameLimit = 1000000000
[rebase]
stat = true
[rerere]
enabled = true
[credential]
helper = cache
[push]
default = simple
[pull]
rebase = true
[diff]
mnemonicprefix = true
renames = copies
renameLimit = 1000000000
[advice]
pushUpdateRejected = false
statusHints = false
commitBeforeMerge = false
resolveConflict = false
detachedHead = false
[help]
autocorrect = 20
[alias]
abbrev-head = !echo 'ref: HEAD' >.git/h
no-abbrev-head = !rm -f .git/h
unstage = reset HEAD --
df = diff
dfc = diff --color=always
dfw = diff --word-diff
dfcw = diff --word-diff=color
dfwc = diff --word-diff --color=always
dfi = diff --cached
dfic = diff --cached --color=always
dfiw = diff --cached --word-diff
dficw = diff --cached --word-diff=color
dfiwc = diff --cached --word-diff --color=always
dt = difftool -y
ss = stash
sp = stash pop
sa = stash apply
st = status
stat = status
cm = commit -v
cma = !git add . && git commit -v
cmd = commit -v --amend --reset-date
cp = cherry-pick
rb = rebase
rba = rebase --abort
rbc = rebase --continue
rbs = rebase --skip
rbm = rebase master
rbi = rebase -i
mg = "!f() { git merge --no-commit --log \"$@\" && git commit -v; }; f"
mt = mergetool
wipe = !git commit -aqm 'WIPE COMMIT' && git reset --hard HEAD^
wp = !git wipe
sw = show
# git bisect requires being in top repo dir
bs = !git bisect
bss = !git bisect start
bse = !git bisect reset
bsg = !git bisect good
bsb = !git bisect bad
# Logging
last = log -1
laste = log -1 --patch --stat
lge = log --patch --stat
# General overview log
lg = log --graph --abbrev=4 "--pretty=format:'%C(auto,yellow)#%h%C(auto,\
reset) {%s}%C(auto,green)%d%C(auto,reset)'"
# Log for dates
lgd = log --graph --abbrev=4 \
"--pretty=format:'%C(auto,yellow)#%h%C(auto,reset) \
{%s}%C(auto,green)%d%C(auto,reset)%n\
<A: %C(auto,cyan)%ai%C(auto,reset) %C(auto,green)(%ar)%C(auto,reset)> \
<C: %C(auto,cyan)%ci%C(auto,reset) %C(auto,green)(%cr)%C(auto,reset)>'"
# Log for names
lgn = log --graph --abbrev=4 \
"--pretty=format:'%C(auto,yellow)#%h%C(auto,reset) \
{%s}%C(auto,green)%d%C(auto,reset)%n\
<A: %C(auto,red)%aN%C(auto,reset) <%C(auto,magenta)%aE%C(auto,reset)>> \
<C: %C(auto,red)%cN%C(auto,reset) <%C(auto,magenta)%cE%C(auto,reset)>>'"
# Logs for both names and dates
lgdn = log --graph --abbrev=4 \
"--pretty=format:'%C(auto,yellow)#%h%C(auto,reset) \
{%s}%C(auto,green)%d%C(auto,reset)%n\
<A: %C(auto,cyan)%ai%C(auto,reset) %C(auto,green)(%ar)%C(auto,reset)> \
<C: %C(auto,cyan)%ci%C(auto,reset) %C(auto,green)(%cr)%C(auto,reset)>%n\
<A: %C(auto,red)%aN%C(auto,reset) <%C(auto,magenta)%aE%C(auto,reset)>> \
<C: %C(auto,red)%cN%C(auto,reset) <%C(auto,magenta)%cE%C(auto,reset)>>'"
lgnd = log --graph --abbrev=4 \
"--pretty=format:'%C(auto,yellow)#%h%C(auto,reset) \
{%s}%C(auto,green)%d%C(auto,reset)%n\
<A: %C(auto,red)%aN%C(auto,reset) <%C(auto,magenta)%aE%C(auto,reset)>> \
<C: %C(auto,red)%cN%C(auto,reset) <%C(auto,magenta)%cE%C(auto,reset)>>%n\
<A: %C(auto,cyan)%ai%C(auto,reset) %C(auto,green)(%ar)%C(auto,reset)> \
<C: %C(auto,cyan)%ci%C(auto,reset) %C(auto,green)(%cr)%C(auto,reset)>'"
# TODO - logs for detailed descriptions
lga = !git lg --all
lgda = !git lgd --all
lgna = !git lgn --all
lgnda = !git lgnd --all
lgdna = !git lgdn --all
lgc = !git lg --color=always
lgdc = !git lgd --color=always
lgnc = !git lgn --color=always
lgndc = !git lgnd --color=always
lgdnc = !git lgdn --color=always
lgac = !git lg --all --color=always
lgdac = !git lgd --all --color=always
lgnac = !git lgn --all --color=always
lgndac = !git lgnd --all --color=always
lgdnac = !git lgdn --all --color=always
lgca = !git lg --color=always --all
lgdca = !git lgd --color=always --all
lgnca = !git lgn --color=always --all
lgndca = !git lgnd --color=always --all
lgdnca = !git lgdn --color=always --all
# Where am I?
br = branch
co = checkout
com = checkout master
cob = checkout -b
# Remotes
fa = fetch --all
up = pull --ff-only
upa = update-all
ps = push
pl = pull
# Github
hub = "!f() { git clone \"github:$1/$2.git\"; }; f"
pr = !git pull-requests