-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.gitconfig
155 lines (127 loc) · 3.81 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
[alias]
# Discard duplicate leading “git” (e.g. “git git status”)
git = "!git"
# The basic aliases
s = status
cm = commit -m
cp = cherry-pick
# Branch related aliases
br = branch
co = checkout
com = checkout master
cod = checkout develop
groom = "!f() { git branch --merged | egrep -v \"(^\\*|master|develop)\" | xargs git branch -d; }; f"
# Syncing related aliases
pur = pull --rebase
prune = fetch --prune
# Rebase related aliases
ri = rebase -i
rb = "!sh -c \"git rebase -i HEAD~$1\" -"
rc = rebase --continue
ra = rebase --abort
rs = rebase --skip
re = rebase --exit
rod = rebase origin/develop
rom = rebase origin/master
# Stash related aliases
poop = stash pop
wip = commit -m "WIP" -n
stsh = stash save --include-untracked
# Push related aliases
force = push --force-with-lease
fam = "!f() { git add . && git amend && git force; }; f"
# Mistake related aliases
abort = checkout -- .
wait = reset HEAD
undo = reset --soft HEAD^
amend = commit --amend --no-edit
# Diff related aliases
changes = diff --name-status
lg = log --pretty=oneline --abbrev-commit --graph --decorate
# Alias related aliases
aliases = ! git config --get-regexp ^alias\\. | sed -e s/^alias\\.// -e s/\\ /\\ =\\ /
[color]
# Enable colors in color-supporting terminals
ui = true
[core]
# Use VSCode as main git editor
editor = code -w
ignoreCase = false
pager = diff-so-fancy | less --tabs=4 -RFX
# Don’t consider trailing space change as a cause for merge conflicts
whitespace = -trailing-space
[diff]
# Use better, descriptive initials (c, i, w) instead of a/b.
mnemonicPrefix = true
# Show renames/moves as such
renames = true
# Display submodule-related information (commit listings)
submodule = log
# Use VSCode as default diff tool when running `git difftool`
tool = vscode
[difftool]
prompt = false
[difftool "vscode"]
cmd = code --wait --diff $LOCAL $REMOTE
[fetch]
fsckobjects = true
# Auto-fetch submodule changes (sadly, won’t auto-update)
recurseSubmodules = on-demand
[filter "media"]
clean = git media clean %f
required = true
smudge = git media smudge %f
[log]
# Use abbrev SHAs whenever possible/relevant instead of full 40-chars
abbrevCommit = true
# Disable decorate for reflog
decorate = false
# Automatically --follow when given a single path
follow = true
[merge]
# Ensure smooth progression from commit to commit
ff = only
# Display common-ancestor blocks in conflict hunks
conflictstyle = diff3
# Custom/dedicated merge drive for npm lock files (`package-lock.json`)
# See https://www.npmjs.com/package/npm-merge-driver
[merge "npm-merge-driver"]
name = automatically merge npm lockfiles
driver = npx npm-merge-driver merge %A %O %B %P
[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
# Auto-accept file prompts when launching merge tools
prompt = false
# Put the temp files in a dedicated dir anyway
writeToTemp = true
[pager]
difftool = true
[push]
default = current
# When pushing, also push tags whose commit-ishs are now reachable upstream
followTags = true
[rebase]
# Automatically stash current WD and stage when running rebase
autoStash = true
[receive]
fsckObjects = true
[status]
# Recursively traverse untracked directories to display all contents
showUntrackedFiles = all
# Display submodule rev change summaries in status
submoduleSummary = true
[tag]
# Sort tags as version numbers whenever applicable
sort = version:refname
[transfer]
fsckobjects = true
[versionsort]
prereleaseSuffix = -pre
prereleaseSuffix = .pre
prereleaseSuffix = -beta
prereleaseSuffix = .beta
prereleaseSuffix = -rc
prereleaseSuffix = .rc