-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig
208 lines (179 loc) · 5.41 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
[include]
path = ~/.gitconfig.local
[core]
editor = $EDITOR
excludesFile = ~/.gitignore
trustctime = false
autocrlf = false
pager = less -R
[apply]
whitespace = fix
[branch]
autosetuprebase = always
[color]
ui = true
diff = true
status = true
branch = true
interactive = true
[color "diff"]
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = cyan bold
branch = cyan bold
changed = magenta bold
deleted = red bold
untracked = yellow bold
[fetch]
parallel = 7
prune = true
pruneTags = true
[format]
# pretty = ...
[help]
autoCorrect = 5
[init]
defaultBranch = main
[pull]
rebase = merges
default = current
[push]
autoSetupRemote = true
default = current
negotiate = true
[tag]
gpgsign = true
[commit]
gpgsign = true
[gpg]
format = ssh
[pager]
branch = true
cmd = diffmerge --merge --result=$MERGED $LOCAL $BASE $REMOTE
[mailmap]
file = ~/.gitmailmap
[merge]
[mergetool "diffmerge"]
[mergetool]
keepBackup = false
[diff]
[difftool "diffmerge"]
cmd = diffmerge $LOCAL $REMOTE
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[filter "nbstripout"]
clean = \"/Users/bradegler/.pyenv/versions/3.10.12/bin/python3\" -m nbstripout
smudge = cat
[credential]
helper = cache
[credential "https://source.developers.google.com"]
helper = gcloud.sh
[credential "https://github.com"]
helper =
helper = !/usr/local/bin/gh auth git-credential
[credential "https://gist.github.com"]
helper =
helper = !/usr/local/bin/gh auth git-credential
[diff "ipynb"]
textconv = \"/Users/bradegler/.pyenv/versions/3.10.12/bin/python3\" -m nbstripout -t
[alias]
# Help ====
h = help
# Dump aliases ====
al = "!grep '\t=' ~/.gitconfig"
alias = "!grep '\t=' ~/.gitconfig | sed -e 's/=/^[[0;31m=^[[0m/g' | sed -e 's/#.*/^[[0;32m&^[[0m/g' | less -R"
# Add ====
ad = add
aa = add .
# Add & commit
acm = !git add . && git cm
acr = !git add . && git cr
# Show all branches ====
br = !git --no-pager branch --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(contents:subject) %(color:green)(%(committerdate:relative)) [%(authorname)]' --sort=-committerdate
# Commit ====
c = commit
cm = commit -m
ca = commit --amend -m
cr = commit --amend --no-edit
# Remote Origin ====
ro = remote add origin
# Checkout ====
co = checkout
cb = checkout -b
cbb = "!f() { \
git cb bradegler/$1; \
}; f"
# Cherry-pick ====
cp = cherry-pick
# Cleanup branches
cleanup = !git branch | grep -v "main" | xargs git branch -D
# Diff ====
df = diff
dt = difftool
# Merge
mg = merge
mt = mergetool
# List ====
tl = tag -l
bl = branch -a
rl = remote -v
# Status ====
st = status -s
# Pull ====
pl = pull
plo = pull --rebase origin
plom = pull --rebase origin main
plog = pull --rebase origin gh-pages
plu = pull --rebase upstream
plum = pull --rebase upstream main
plug = pull --rebase upstream gh-pages
# Push ====
ps = push
psf = push -f
pso = push origin
psom = push origin main
psog = push origin gh-pages
psu = push upstream
psum = push upstream main
psug = push upstream gh-pages
psuom = push -u origin main
pr = push -u origin HEAD
# Logs ====
l = log --pretty=oneline --decorate --abbrev-commit --max-count=15
ll = log --graph --pretty=format:'%Cred%h%Creset %an: %s %Creset%Cgreen(%cr)%Creset' --abbrev-commit --date=relative
lf = log --graph --pretty=format:'%Cred%h%Creset %an: %s %Creset%Cgreen(%cr)%Creset' --abbrev-commit --date=relative --name-status
lg = log --graph --pretty=oneline --decorate --abbrev-commit
ls = log --pretty=format:'[%h] %an %ar: %s' --stat
lo = log --date-order --date=iso --graph --full-history --all --pretty=format:'%x08%x09%C(red)%h %C(cyan)%ad%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08%x08 %C(bold blue)%aN%C(reset)%C(bold yellow)%d %C(reset)%s'
up = "!f() { git fetch --all; git pull origin HEAD; for upstream in $(git remote); do git remote prune "${upstream}"; done }; f"
graph = "!f() { git log --oneline --abbrev-commit --graph --decorate; }; f"
amend = !git add . && git commit --amend --no-edit
# Sync ====
sync = town sync
# Pull all submodules ====
sp = submodule foreach git pull
# git svn bridge ====
svr = svn rebase
svd = svn dcommit
svl = svn log --oneline --show-commit
# enable credential storage
su = config credential.helper store
# Mark file as unchanged
hide = update-index --assume-unchanged
unhide = update-index --no-assume-unchanged
rao = remote add origin
rau = remote add upstream
append = town append
diff-parent = town diff-parent
hack = town hack
kill = town kill
prepend = town prepend
propose = town propose
rename-branch = town rename-branch
repo = town repo
ship = town ship