-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig
180 lines (146 loc) · 3.35 KB
/
config
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
[user]
email = [email protected]
name = Jeffrey Xiao
[core]
excludesfile = ~/.config/git/ignore
editor = nvim
[color]
# Use colors in Git commands that are capable of colored output when
# outputting to the terminal. (This is the default setting in Git ≥ 1.8.4.).
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
# Meta information.
meta = yellow bold
# Hunk header.
frag = cyan bold
# Removed lines.
old = red
# Added lines.
new = green
[color "status"]
added = yellow
changed = green
untracked = cyan
[apply]
# Detect whitespace errors when applying a patch.
whitespace = fix
[log]
abbrevCommit = true
follow = true
[commit]
verbose = true
[push]
default = simple
followTags = true
[pull]
rebase = true
[merge]
# Includes summaries of merged commits in newly created merge commit messages.
log = true
[rebase]
autoSquash = true
autoStash = true
[alias]
# Log.
l = log --graph
ls = log --pretty=format:'%C(yellow)%h %Cred%ad %Cblue%an%Cgreen%d %Creset%s' --date=short
lp = log --graph --patch
# Diff.
d = diff
dc = diff --cached
di = !"f() { git diff HEAD~$1; }; f"
ds = diff --stat
# Status.
s = status
si = status --ignored
ss = status --short
# Index.
a = add
aa = add --all
au = add --update
ap = add --patch
ai = add --interactive
# Commit.
c = commit --verbose
cf = commit --verbose --fixup
cs = commit --verbose --squash
ca = commit --verbose --amend
can = commit --verbose --amend --no-edit
# Checkout.
co = checkout
cob = checkout -b
# Branch.
b = branch
bc = branch --contains
bd = branch --delete --force
bv = branch --verbose --verbose
ba = branch --verbose --verbose --all
# Tag.
t = tag
tc = tag --contains
td = tag --delete
ta = tag --list
# Network (in).
cl = clone --recursive
pl = pull
f = fetch
# Network (out).
ps = push
psf = push --force
# Submodule.
sub = submodule
subu = submodule update --init --recursive --force
# Merge.
m = merge
ma = merge --abort
mc = merge --continue
mq = merge --quit
mff = merge --ff-only
# Rebase.
rb = rebase
rba = rebase --abort
rbc = rebase --continue
rbq = rebase --quit
rbs = rebase --skip
# Interactive rebase.
rbi = rebase --interactive
rbii = !"f() { git rebase --interactive HEAD~$1; }; f"
# Cherry-pick.
cp = cherry-pick
cpa = cherry-pick --abort
cpc = cherry-pick --continue
cpq = cherry-pick --quit
cps = cherry-pick --skip
# Revert.
rv = revert
rva = revert --abort
rvc = revert --continue
rvq = revert --quit
rvs = revert --skip
# Reset.
rs = reset
rss = reset --soft
rsh = reset --hard
# w-commands.
which-branch = branch --all --contains
which-tag = describe --always --contains
mr = !"f() { git fetch $1 merge-requests/$2/head:mr-$1-$2 && git checkout mr-$1-$2; }; f"
pr = !"f() { git fetch $1 pull/$2/head:pr-$1-$2 && git checkout pr-$1-$2; }; f"
[github]
user = jeffrey-xiao
[credential "https://github.com"]
username = jeffrey-xiao
[gitlab]
user = jeffrey-xiao
[credential "https://gitlab.com"]
username = jeffrey-xiao
[url "ssh://[email protected]/"]
insteadOf = https://github.com/
[url "ssh://[email protected]/"]
insteadOf = https://gitlab.com/
[url "ssh://[email protected]/"]
insteadOf = https://bitbucket.org/