-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
148 lines (119 loc) · 2.58 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
[user]
name = Elvish Moss
email = 123456789+elvishmoss@users.noreply.github.com
# signingkey = 1A1B1C1D1E123DF456XYZ
[github]
user = elvishmoss
[color]
ui = auto
branch = auto
diff = auto
status = auto
[core]
excludesfile = ~/.gitignore
editor = code -w
autocrlf = input
mergeoptions = --no-ff --no-commit
[diff]
tool = vscode
[difftool "vscode"]
cmd = code --wait --diff $LOCAL $REMOTE
[merge]
tool = vscode
log = true
[mergetool "vscode"]
cmd = code --wait $MERGED
[apply]
# detect whitespace errors when applying a patch
whitespace = fix
[alias]
# used the most by me
aa = add --all
cm = commit -S -m
cma = !git add --all && git commit -S -m
co = checkout
rv = remote -v
# checkouts
cb = checkout -b
cob = checkout -b
ct = checkout -t
cr = checkout --
unstage = reset HEAD
# submodules
sm = "!f() { git submodule update --init --recursive $1; }; f"
# branch management
b = branch
ba = branch -a
bd = branch -d
bD = branch -D
bm = branch -m
d = diff
dt = difftool
m = merge
mt = mergetool
r = rebase
rr = remote rm
# rebases & squash
rb = rebase
rbi = rebase -i
rbc = rebase --continue
rba = rebase --abort
rbs = rebase --skip
rf = reflog
unstage = reset HEAD --
uncommit = reset --soft HEAD~1
undo = reset --soft HEAD~1
delete = reset --hard HEAD~1
trash = reset --hard HEAD~1
# squashes
sq = "!f() { git rebase -i HEAD~$1; }; f"
# tags
t = tag -l
squash = "!f() { git rebase -i HEAD~$1; }; f"
# stashes
st = stash
stl = stash list
stp = stash pop
sts = "!f() { git stash show stash@{$1}; }; f"
std = "!f() { git stash show stash@{$1} -U5; }; f"
strm = "!f() { git stash drop stash@{$1} -U5; }; f"
# commits
c = commit
# pushes & pulls
f = fetch --prune
p = push
ps = push
pl = pull
pur = pull --rebase
pr = pull-request
psf = push --force
upm = !git fetch upstream && git merge upstream/master
[push]
default = simple
followTags = true
[filter "media"]
required = true
clean = git media clean %f
smudge = git media smudge %f
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
required = true
process = git-lfs filter-process
[help]
# automatically correct and execute mistyped commands.
autocorrect = 1
[gui]
commitmsgwidth = 80
pruneduringfetch = true
tabsize = 2
[commit]
# gpgsign = true
[suer]
# signingkey = 6C9732CDD2C37024
[gpg]
program = gpg2
[pull]
rebase = false
[init]
defaultBranch = main