-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitconfig
131 lines (131 loc) · 3.2 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
[http]
version = HTTP/1.1
[user]
name = bekaboo
email = [email protected]
[init]
defaultBranch = master
[alias]
a = add
ap = add -p
au = add -u
aup = add -up
b = branch
bd = branch -d
bdf = branch -d --force
bdr = push -d
bl = branch -v
bs = bisect
bsb = bisect bad
bsg = bisect good
bsr = bisect reset
bss = bisect start
c = commit
ca = commit --amend
cl = clone
cl1 = clone --depth=1
cln = clone --filter=blob:none
clr = clone --recursive
cm = commit -m
co = checkout
cof = checkout --force
com = "!git show-ref --verify --quiet refs/heads/master && git checkout master || git checkout main"
comf = "!git show-ref --verify --quiet refs/heads/master && git checkout master --force || git checkout main --force"
; Checkout specified commit without changing the working tree and branch
; pointer, aka "soft checkout"
cos = "!__git_cos() { git checkout --detach && git reset --soft $1 && git checkout $1; }; __git_cos"
d = diff
ds = diff --cached
f = fetch
ia = merge-base --is-ancestor
l = log --oneline --graph
; `$GIT_PREFIX` contains the relative path from repo root to current working
; directory with trailing slash
; When no argument is given to `git lc`, use repo root as base path
; (default behavior) and all files in the repo is counted,
; else use current shell cwd as base path and only count files in given path
lc = "!__git_lc() { git ls-files -z ${1:+\"$GIT_PREFIX$1\"} | xargs -0 wc -l 2>/dev/null; }; __git_lc"
ls = ls-files
m = merge
ma = merge --abort
mt = mergetool
p = push
pf = push --force
pk = cherry-pick
pka = cherry-pick --abort
pkc = cherry-pick --continue
pl = pull
r = remote
ra = remote add
rb = rebase
rba = rebase --abort
rbc = rebase --continue
rbh = rebase --onto HEAD
rbi = rebase -i
rbo = rebase --onto
rl = remote -v
rd = remote rm
rrm = remote rm
rs = reset
rss = reset --soft
rsm = reset --mixed
rsh = reset --hard
rt = restore
rtp = restore -p
rts = restore --staged
rtsp = restore --staged -p
ru = remote set-url
rv = revert
rva = revert --abort
rvc = revert --continue
rvs = revert --skip
s = stash
sa = stash apply
sb = stash branch
sd = stash drop
sl = stash list
sm = stash -m
sp = stash pop
ss = stash --staged
ssm = stash --staged -m
st = status
su = submodule
sui = submodule init
sul = submodule status
suu = submodule update
sw = stash show
swi = switch
swc = switch --create
swd = switch --detach
swo = switch --orphan
sww = stash show -p
t = tag
ta = tag -a
td = tag -d
tl = tag -l
tm = tag -m
w = show --stat
wa = log --diff-filter=A
wc = log --diff-filter=C
wd = log --diff-filter=D
wm = log --diff-filter=M
wp = log --diff-filter=B
wr = log --diff-filter=R
wt = log --diff-filter=T
wu = log --diff-filter=U
ww = show
wx = log --diff-filter=X
[merge]
tool = vimdiff
[mergetool]
keepBackup = false
[mergetool "vimdiff"]
cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
[pull]
rebase = true
[diff]
algorithm = histogram
indentHeuristic = true
[filter "vscode-theme"]
smudge = cat
clean = sed '/[cC]olorTheme/d'