-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig
166 lines (131 loc) · 4.24 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
[user]
name = Johannes Larsen
email = [email protected]
signingkey = B26FAB26
[gitget]
root = .
skip-host = true
[blame]
showEmail
[branch]
autoSetupMerge = false
[color]
ui = auto
[core]
pager = less -FiMRSWX
[diff]
context = 2
mnemonicPrefix
renames = copy
indentHeuristic
colorMoved
[diff "spreadsheet"]
textconv = spreadsheet2stdout
cachetextconv = true
[diff "cpp"]
xfuncname = "^((::[[:space:]]*)?[[A-Za-z_].*)$"
[init]
defaultBranch = master
[interactive]
singleKey
[log]
date = iso
decorate = auto
[merge]
tool = nvimdiff
[mergetool]
keepBackup = false
keepTemporaries = false
[pretty]
r = %C(yellow)%h %C(cyan)%ai %C(magenta)%aE %C(green)%s
rd = %C(yellow)%h%C(auto)%d %C(cyan)%ai %C(magenta)%aE %C(green)%s
rc = %C(cyan)%ad %C(green)%s
[pull]
ff = only
[push]
default = current
[rebase]
abbreviateCommands
missingCommitsCheck = warn
stat = true
[status]
showStash = true
[alias]
st = status
nst = status -s
ust = status -uno
unst = status -s -uno
df = diff --compact-summary -p
sdf = diff --compact-summary
rdf = diff --dirstat
cdf = diff --compact-summary -p --cached
ci = commit
cim = commit -m
cia = commit -a
fix = commit --fixup
fixs = !git commit --fixup `gitf`
squash = commit --squash
squashs = !git commit --squash `gitf`
amend = commit --amend
l = log
pl = log --compact-summary -p
wl = log --compact-summary -pw
sl = log --compact-summary
sgl = log --graph --all --compact-summary
gl = log --graph --all
hl = log --format=format:'%H %s'
fl = log --format=fuller
ol = log --oneline
rl = log --format=r
r10 = log --format=r -n10
r40 = log --format=r -n40
rl0 = log --format=r --compact-summary -U0
rcl = log --date=short --format=format:'%C(cyan)%ad %C(green)%s'
rdl = log --format=rd
rgl = log --graph --all --format=rd
rsgl = log --compact-summary --graph --all --format=rd
rsl = log --format=rd --compact-summary
wc = whatchanged
rwc = whatchanged --pretty=format:'%C(yellow)%h %C(cyan)%ai %C(magenta)%aE %C(green)%s'
ns = show --name-status
ps = show -p --compact-summary
ss = show --compact-summary
ws = show -pw --compact-summary
ff = merge --ff-only
rpull = pull --rebase
ipull = pull --rebase=interactive
mpull = pull --no-rebase
mt = mergetool
rbi = rebase -i
rba = rebase --abort
rbc = rebase --continue
rbf = rebase -i --autosquash
rbm = -c sequence.editor='nvim -c :%s/^f/p/e -c %s/^s/p/e' rebase -i --autosquash
p = cherry-pick
pa = cherry-pick --abort
pc = cherry-pick --continue
refs = !set -o pipefail && git reflog --color | fzf-tmux +s -m --layout reverse --ansi --preview-window=down --preview 'git ps --color {1}' | cut -d' ' -f1
# `&& printf ""` to make silently ignore further arguments given from CLI, instead of having them apply in addition to the selected ones
ffs = !r=( `gitf` ) && git merge --ff-only "${r[@]}" && printf ""
rbs = !r=( `gitf` ) && git rebase -i "${r[@]}" && printf ""
rbfs = !r=( `gitf` ) && git rebase -i --autosquash "${r[@]}" && printf ""
resets = !r=( `gitf` ) && git reset "${r[@]}" && printf ""
reseth = !r=( `gitf` ) && git reset --hard "${r[@]}" && printf ""
resetr = !r=( `git refs` ) && git reset --hard "${r[@]}" && printf ""
picks = !rs=( `gitf` ) && git cherry-pick "${rs[@]}" && printf ""
big = bisect good
bib = bisect bad
bis = bisect stop
bir = bisect reset
padd = add -p
rclone = clone --recurse-submodules
co = checkout
cos = !git checkout `git branch | grep -v '^*'| awk '{print $1}' | fzf --preview 'git rcl -n$LINES {}'` && printf ""
cosa = !git checkout `git branch -a | grep -v '^*'| awk '{print $1}' | fzf --preview 'git rcl -n$LINES {}'` && printf ""
coc = !git checkout `gitf` && printf ""
smaster = submodule foreach --recursive git checkout master
spull = submodule foreach --recursive git rpull
spush = submodule foreach --recursive git push
sfetch = submodule foreach --recursive git fetch
sco = submodule foreach --recursive git checkout
spop = stash pop --index