-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.gitconfig
251 lines (221 loc) · 7.76 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
[user]
name = Andrei Dragomir
email = [email protected]
[color]
ui = 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
[log]
decorate = full
date = relative
[interactive]
singlekey = true
[alias]
news = log -p @{1}..
st = status
change-commits = "!f() { VAR=$1; OLD=$2; NEW=$3; shift 3; git filter-branch --env-filter \"if [[ \\\"$`echo $VAR`\\\" = '$OLD' ]]; then export $VAR='$NEW'; fi\" $@; }; f " snapshot = !git stash save "snapshot: $(date)" && git stash apply "stash@{0}"
snapshots = !git stash list --grep snapshot
cleanup = !git remote prune origin && git gc && git clean -df && git stash clear
recent-branches = !git for-each-ref --count=15 --sort=-committerdate refs/heads/ --format='%(refname:short)'
unreachable = "!git fsck --unreachable | grep commit | cut -d \\ -f3 | xargs git log --merges --no-walk"
st2 = "ls-files --exclude-per-directory=.gitignore --exclude-from=.git/info/exclude -t -o -u -s -m -d"
sts = status -sb --ignore-submodules=all -unormal
cat = -p cat-file -p
ci = commit
root = rev-parse --show-toplevel
id = rev-parse
cp = cherry-pick # grab a change from a branch
this = rev-parse --abbrev-ref HEAD
co = checkout
di = diff
d = diff --ignore-submodule # diff unstaged changes
dc = diff --cached --ignore-submodules
amend = commit --amend
aa = add --all
au = add -pu
cu = checkout -p
ff = merge --ff-only
pl = pull
pullff = pull --ff-only
# Divergence (commits we added and commits remote added)
div = divergence
# Goodness (summary of diff lines added/removed/total)
gn = goodness
gnc = goodness --cached
fa = fetch --all --prune
f = fetch -p --tags
un = rm --cached
head = !git l -1
b = branch -v
ba = branch -av
bd = "!git branch -D $1; git push origin \":${1}\""
h = !git head
hp = "!source ~/bin/githelpers && show_git_head"
l = "!source ~/bin/githelpers && pretty_git_log"
la = !git l --all
r = !git l -30
ra = !git r --all
w = !git branch -a && git log --branches --oneline --graph --decorate --simplify-by-decoration --since='2 months ago'
log1 = log --pretty=oneline --abbrev-commit --decorate
llog = log --graph --pretty=format:'%C(yellow)%h%Creset %C(bold blue)%an%Creset -%C(bold cyan)%d%Creset %s %C(green)(%cr)%Creset' --abbrev-commit --date=relative
lg = log --pretty=format:'%C(yellow)%h %C(green)%ar %C(bold blue)%an%Creset\n%s' --abbrev-commit --date=relative
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
file-blame = !git ls-files | xargs -n1 -i{} git log -1 --pretty=format:\"%ci {}\" -- {}
pr = ! export CURRENT=$(git symbolic-ref HEAD | gsed -e "s#refs/heads/##") && echo \"Synchronising with origin/$CURRENT...\" && git fetch origin && git rebase -p origin/$CURRENT
last = rev-list -n 1 HEAD -- "$1"
restore = ! FILE=$1 && git checkout $(git rev-list -n 1 HEAD -- "$FILE")^ -- "$FILE"
rc = rebase --continue # continue rebase
prb = "!rebase() { \
LOCAL_BRANCH=$(git symbolic-ref HEAD | sed -e \"s?.*/\\([^/]*\\)?\\1?\") && \
echo $LOCAL_BRANCH && \
REMOTE_BRANCH=${2:-$(git config branch.${LOCAL_BRANCH}.merge | sed -e \"s?.*/\\([^/]*\\)?\\1?\")} && \
REMOTE_NAME=${1:-$(git config branch.${LOCAL_BRANCH}.remote)} && \
echo \"Synchronising $LOCAL_BRANCH with $REMOTE_NAME/$REMOTE_BRANCH...\" &&\
git stash && \
git fetch $REMOTE_NAME && \
git rebase -p $REMOTE_NAME/$REMOTE_BRANCH && \
git stash pop; };\
rebase"
prbm = "!rebase() { \
LOCAL_BRANCH=$(git symbolic-ref HEAD | sed -e \"s?.*/\\([^/]*\\)?\\1?\") && \
echo $LOCAL_BRANCH && \
REMOTE_BRANCH=master && \
REMOTE_NAME=origin && \
echo \"Synchronising $LOCAL_BRANCH with $REMOTE_NAME/$REMOTE_BRANCH...\" &&\
git stash && \
git fetch $REMOTE_NAME && \
git rebase -p $REMOTE_NAME/$REMOTE_BRANCH && \
git stash pop; };\
rebase"
rbi = ! export LOCAL_BRANCH=$(git symbolic-ref HEAD | sed -e \"s?.*/\\([^/]*\\)?\\1?\") && echo $LOCAL_BRANCH && export REMOTE_BRANCH=$(git config branch.${LOCAL_BRANCH}.merge | sed -e \"s?.*/\\([^/]*\\)?\\1?\") && REMOTE_NAME=$(git config branch.${LOCAL_BRANCH}.remote) && git rebase -i $REMOTE_NAME/$REMOTE_BRANCH
rb = "!fn() { git stash && git rebase -i HEAD~$1 && git stash pop; }; fn"
cos = "!fn() { git stash && git co $1 && git stash pop; }; fn"
webui = !/Users/adragomir/.git-webui/release/libexec/git-core/git-webui
[format]
pretty = format:%C(blue)%ad%Creset %C(yellow)%h%C(green)%d%Creset %C(blue)%s %C(magenta) [%an]%Creset
[pull]
rebase = true
[push]
default = simple
[rebase]
stat = true
autostash = true
[diff]
algorithm = patience
ignoresubmodules = all
mnemonicprefix = true
renameLimit = 4000
[mergetool]
prompt = false
keepBackup = false
[help]
autocorrect = 1
[fetch]
prune = true
[merge]
summary = true
#tool = smerge
tool = bcomp
#tool = araxis
#tool = opendiff
[core]
legacyheaders = false
excludesfile = /Users/adr/.gitignore_global
editor = vim --noplugin
quotepath = false
pager = less -+F -+X -R -K
autocrlf = input
filemode = false
[apply]
whitespace = nowarn
[repack]
usedeltabaseoffset = true
[advice]
statusHints = false
skippedCherryPicks = false
[gui]
fontdiff = -family Inconsolata-g -size 13 -weight normal -slant roman -underline 0 -overstrike 0
editor = mvim
fontui = -family \"Noto Sans\" -size 12 -weight normal -slant roman -underline 0 -overstrike 0
tabsize = 2
; [github]
; user = adragomir
; password = ! /usr/bin/security 2>&1 >/dev/null find-generic-password -gs github | ruby -e 'print $1 if STDIN.gets =~ /^password: \\\"(.*)\\\"$/'
[hub]
host = git.corp.adobe.com
protocol = https
[branch]
autosetupmerge = false
autosetuprebase = always
[status]
relativePaths = false
showUntrackedFiles = all
[rerere]
enabled = true
[giggle]
main-window-maximized = true
main-window-geometry = 274x34+1164+486
history-view-vpane-position = 300
main-window-view = FileView
file-view-vpane-position = 443
[url "https://github.com"]
insteadOf = git://github.com
[url "[email protected]:"]
insteadOf = https://git.corp.adobe.com/
[grep]
fullname = true
extendRegexp = true
lineNumber = true
[filter "media"]
required = true
clean = git media clean %f
smudge = git media smudge %f
[difftool "araxis"]
path = C:\\Program Files\\Araxis\\Araxis Merge\\compare.exe
[mergetool "araxis"]
path = C:\\Program Files\\Araxis\\Araxis Merge\\compare.exe
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Users/adragomir/Applications/Development Tools/Sourcetree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[mergetool "smerge"]
cmd = /Users/adragomi/bin/smerge mergetool \"$BASE\" \"$LOCAL\" \"$REMOTE\" -o \"$MERGED\"
trustExitCode = true
[difftool "bcomp"]
trustExitCode = true
cmd = "/usr/local/bin/bcomp" \"$LOCAL\" \"$REMOTE\"
[mergetool "bcomp"]
trustExitCode = true
cmd = "/usr/local/bin/bcomp" \"$LOCAL\" \"$REMOTE\" \"$BASE\" \"$MERGED\"
[commit]
template = /Users/adragomir/.stCommitMsg
[cola]
spellcheck = false
[webui]
autoupdate = true
[credential]
helper = manager
helper =
helper = /usr/local/share/gcm-core/git-credential-manager
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[http]
cookiefile = /Users/adragomi/.gitcookies
[credential "https://dev.azure.com"]
useHttpPath = true