/
.gitconfig
175 lines (170 loc) · 5.55 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
[user]
email = james.packjr@outlook.com
name = James Pack
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[diff]
tool = default-difftool
# Use better, descriptive initials (c, i, w) instead of a/b.
mnemonicPrefix = true
# Show renames/moves as such
renames = true
# When using --word-diff, assume --word-diff-regex=.
wordRegex = .
# Display submodule-related information (commit listings)
submodule = log
[difftool "default-difftool"]
cmd = code --wait --diff $LOCAL $REMOTE
[core]
editor = 'C:\\Users\\james\\AppData\\Local\\Programs\\Microsoft VS Code\\code.exe' -w
autocrlf = false
safecrlf = false
ignorecase = false
excludesfile = ~/.gitignore_global
[alias]
aliases = !git config --get-regexp alias | sed -re 's/alias\\.(\\S*)\\s(.*)$/\\1 = \\2/g'
a = add
aa = add -A
ac = "!f() { curl $@ | git apply --index; }; f"
ac3 = "!f() { curl $@ | git apply -3 --index; }; f"
amend = commit --amend -C HEAD
ap = add -p
app = apply --index
br = branch
cb = checkout -b
cc = !git rh core && git co core && git clean -fd core
ci = commit
cim = commit -m
cl = clone
co = checkout
cp = cherry-pick
df = diff
dh = diff HEAD
dic = diff --cached
go = checkout
# Display tree-like log, because default log is a pain…
lg = log --graph --date=relative --pretty=tformat:'%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%an %ad)%Creset'
ol = log --oneline
# Useful when you have to update your last commit
# with staged files without editing the commit message.
oops = commit --amend --no-edit
# Ensure that force-pushing won't lose someone else's work (only mine).
push-with-lease = push --force-with-lease
p = format-patch --stdout
pg = "!f() { push origin $1:refs/for/$2; }; f"
pl = pull
plom = pull origin master
pom = push origin master
pomp = push origin master:preprod
poml = push origin master:prod
poa = push origin --all
rb = rebase
rh = reset HEAD
sl = stash list
sp = stash pop
ss = stash save
st = status
ignore = update-index --assume-unchanged
unignore = update-index --no-assume-unchanged
ignored = !git ls-files -v | grep '^h'
who = shortlog -sne
graph = log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
# List local commits that were not pushed to remote repository
review-local = "!git lg @{push}.."
# Edit last commit message
reword = commit --amend
# Undo last commit but keep changed files in stage
uncommit = reset --soft HEAD~1
# Remove file(s) from Git but not from disk
untrack = rm --cache --
[color]
ui = true
[branch]
autosetuprebase = always
[diff]
renames = copies
algorithm = patience
[push]
default = simple
[merge "theirs"]
driver = true
[diff "nodiff"]
command = /bin/true
[grep]
break = true
heading = true
lineNumber = true
# Consider most regexes to be ERE
extendedRegexp = true
[log]
# Use abbrev SHAs whenever possible/relevant instead of full 40 chars
abbrevCommit = true
# Automatically --follow when given a single path
follow = true
# Disable decorate for reflog
# (because there is no dedicated `reflog` section available)
decorate = false
[mergetool]
# Clean up backup files created by merge tools on tool exit
keepBackup = false
# Clean up temp files created by merge tools on tool exit
keepTemporaries = false
# Put the temp files in a dedicated dir anyway
writeToTemp = true
# Auto-accept file prompts when launching merge tools
prompt = false
# [page]
# Use custom pager to get an better log on terminal.
# As this is an external tool it has to be installed.
# See https://github.com/so-fancy/diff-so-fancy
# show = diff-so-fancy | less --tabs=4 -RFX
[pull]
# This is GREAT… when you know what you're doing and are careful
# not to pull --no-rebase over a local line containing a true merge.
# rebase = true
# This option, which does away with the one gotcha of
# auto-rebasing on pulls, is only available from 1.8.5 onwards.
# rebase = preserve
# WARNING! This option, which is the latest variation, is only
# available from 2.18 onwards.
rebase = merges
[push]
# Default push should only push the current branch to its push target, regardless of its remote name
default = upstream
# When pushing, also push tags whose commit-ishs are now reachable upstream
followTags = true
# [rebase]
# Rebase advanced usage.
# Automagically reorder and prefix your commands while doing an interactive
# rebase. This has to be used with `--fixup` and/or `--squash` options for
# `git commit`.
# autoSquash = true
# Automatically stash current WD and stage when running rebase
# then you won't have to manually `git stash push` and `git stash pop`
# after and before your rebase.
# autoStash = true
# [rerere]
# If, like me, you like rerere, uncomment these
# autoupdate = true
# enabled = true
[status]
# Display submodule rev change summaries in status
submoduleSummary = true
# Recursively traverse untracked directories to display all contents
showUntrackedFiles = all
[color "branch"]
# Blue on black is hard to read in git branch -vv: use cyan instead
upstream = cyan
[tag]
# Sort tags as version numbers whenever applicable, so 1.10.2 is AFTER 1.2.0.
sort = version:refname
[versionsort]
prereleaseSuffix = -pre
prereleaseSuffix = .pre
prereleaseSuffix = -beta
prereleaseSuffix = .beta
prereleaseSuffix = -rc
prereleaseSuffix = .rc