-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
327 lines (189 loc) · 7.19 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
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
# GITCONFIG for MCP.
#
# Editing aliases for current configuration of GIT.
[alias]
# ALIAS: Display every of aliases inside the configuration.
aliases = !git config --get-regexp alias | sed -re 's/alias\\.(\\S*)\\s(.*)$/\\1 = \\2/g'
# ALIAS: Edit settings of the repository.
bc = rev-parse --abbrev-ref HEAD
bu = !git rev-parse --abbrev-ref --symbolic-full-name "@{u}"
# ALIAS: Set up the stream.
set-up-stream = !git branch --set-upstream-to=$(git bu)
# ALIAS: Delete chosen branch.
delete-branch = branch -D
# ALIAS: Display every branch of the repository.
display-branch = !git branch
display-branch-all = !git branch -a
# ALIAS: Show up LS.
ls = ls-files
# ALIAS: Check out the repository.
co = checkout
co-branch = checkout -b
# ALIAS: Push changes made in repository.
cm = !git commit -m
cm-add = !git add -A && git cm
cm-edit = commit -a --amend
amend = !git commit --amend --no-edit
amend-all = !git add -A && git amend
# ALIAS: Reword the commit.
reword = commit --amend
# ALIAS: Unstage changes of past commit.
uncommit = reset --soft HEAD~1
# ALIAS: Fetching commits and branches.
read = !git fetch -p
read-all = !git fetch -a -p
# ALIAS: Update the main branch.
up = !git pull --rebase --prune $@
update = !git read && git rebase origin/main
update-main = !git pull origin main
update-branch = !git pull origin $(git bc)
# ALIAS: Force-push of commit without lease.
push-with-lease = push --force-with-lease
# ALIAS: Functioning with submodules of the repository.
cm-sm = !git cm "SUBMODULE REFERENCE UPDATED"
update-sm = !git pull --recurse-submodules && git submodule update --init --recursive
# ALIAS: Waypoint any changes in unsaved commit.
wip = commit -am "WIPPOINT"
save = !git add -A && git commit -m 'SAVEPOINT'
# ALIAS: Rebase of each other commit.
rebase-with-hooks = rebase -x 'git reset --soft HEAD~1 && git commit -C HEAD@{1}'
# ALIAS: Reset changes.
undo = reset HEAD~1 --mixed
unstage = reset
uncommit = reset --soft HEAD^
reset-head = reset HEAD --hard
reset-branch = reset --hard $(git bu)
wipe = !git add -A && git commit -qm 'WIPE SAVEPOINT' && git reset HEAD~1 --hard
# ALIAS: Merge changes in the branch.
mg = !git merge
mg-nf = !git merge --no-ff
# ALIAS: Set up audit log.
lg = log
lg-lite = log --oneline --decorate
lg-latest = log --abbrev-commit --decorate --format=format:'%C(bold red)%h%C(reset) - %C(bold blue)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold yellow)%d%C(reset) %n''%C(dim yellow)%H%C(reset) - %C(white)%s%C(reset) %n''%C(green)-(Committer: %cn <%ce>)%C(reset) %C(dim white)-(Author: %an <%ae>)%C(reset)' -1 HEAD --stat
lg-branch = log --graph --abbrev-commit --decorate --format=format:'%C(bold red)%h%C(reset) - %C(bold blue)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold yellow)%d%C(reset) %n''%C(dim yellow)%H%C(reset) - %C(white)%s%C(reset) %n''%C(green)-(Committer: %cn <%ce>)%C(reset) %C(dim white)-(Author: %an <%ae>)%C(reset)' HEAD --stat
lg-all = log --graph --abbrev-commit --decorate --format=format:'%C(bold red)%h%C(reset) - %C(bold blue)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold yellow)%d%C(reset) %n''%C(dim yellow)%H%C(reset) - %C(white)%s%C(reset) %n''%C(green)-(Committer: %cn <%ce>)%C(reset) %C(dim white)-(Author: %an <%ae>)%C(reset)' --all --stat
lg-mychange = "!myname=$(git config --get user.name);myemail=$(git config --get user.email); git log --graph --abbrev-commit --decorate --author $myemail " HEAD --stat
[core]
# CORE: Disable paginating system.
pager = cat
# CORE: Edit the default IGNORE-files.
excludesfile = ~/.gitignore
# CORE: Declare mode of commands with output.
quotepath = false
# CORE: Edit endings preferences in repository.
autocrlf = input
safecrlf = warn
# CORE: Launch an editor with specified value.
editor = emacsclient -t -a emacs
# COLOR: Enable coloured interface.
[color]
ui = true
pager = true
interactive = auto
grep = always
decorate = always
showbranch = always
# COLOR BRANCH: Enable colouring in branches interface.
[color "branch"]
current = green bold
local = magenta
remote = cyan
# COLOR DIFF: Enable colouring in differences interface.
[color "diff"]
old = red
new = green
meta = cyan
frag = magenta
whitespace = yellow reverse
# COLOR "STATUS": Enable colouring in status interface.
[color "status"]
added = green
branch = green bold
changed = cyan
deleted = red dim
untracked = magenta
[branch]
autosetuprebase = always
[branch "main"]
rebase = true
[diff]
# DIFF: Declare default editor of differences.
tool = code
# DIFF: Enable showing up renames.
renames = true
# DIFF: Assume differences between specified regex.
wordRegex = .
# DIFF: Display information about current submodules.
submodule = log
# DIFF: Enable better and descriptive initials.
mnemonicPrefix = true
# DIFFTOOL: Disable prompt of differences.
[difftool "vscode"]
cmd = code --wait --diff $LOCAL $REMOTE
# FETCH: Enable auto-fetch of submodules.
[fetch]
recurseSubmodules = on-demand
[grep]
# GREP: Set up the highlight matches.
break = true
heading = true
lineNumber = true
# GREP: Consider most of regexes.
extendedRegexp = true
[log]
# LOG: Automatically follow single path.
follow = true
# LOG: Disable decorating of reference logging.
decorate = false
# LOG: Use abbreviate SHA.
abbrevCommit = true
[credential]
# CREDENTIAL: External helping module of credentials.
helper = osxkeychain
# CREDENTIAL: Acquire credential as component of HTTP.
useHttpPath = true
# MERGE: Display common ancestoring blocks in conflicts.
[merge]
ff = false
[mergetool]
# MERGETOOL: Clean up the backup files created by editor.
keepBackup = false
# MERGETOOL: Clean up the temp.
keepTemporaries = false
# MERGETOOL: Put temp in dedicated directory.
writeToTemp = true
# MERGETOOL: Auto accept file prompts in case of launch merging modules.
prompt = false
[page]
show = diff-so-fancy | less --tabs=4 -RFX
[pull]
rebase = merges
[push]
# PUSH: Default push should push current branch to the target.
default = upstream
# PUSH: Push tags with commits in reachable upstream.
followTags = true
[rebase]
# REBASE: Rebase advanced usage.
autoSquash = true
# REBASE: Automatically stash current withdrawal and stages.
autoStash = true
[rerere]
enabled = true
autoupdate = true
[status]
# STATUS: Display submodule referencing change summaries in status.
submoduleSummary = true
# STATUS: Recursively traverse untracked directories to display context.
showUntrackedFiles = all
# TAG: Enable sorting algorithm of tags by numbers.
[tag]
sort = version:refname
[versionsort]
prereleaseSuffix = -pre
prereleaseSuffix = .pre
prereleaseSuffix = -beta
prereleaseSuffix = .beta
prereleaseSuffix = -rc
prereleaseSuffix = .rc