-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
gitconfig
145 lines (145 loc) · 3.53 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
[user]
name = Dennis B
email = [email protected]
[push]
default = simple
[core]
autocrlf = input
pager = delta
untrackedCache = true
# fsmonitor = true # Enable only for large repositories
#[feature]
# manyFiles = true # Enable only for large repositories
[color]
ui = auto
[commit]
verbose = true
[init]
defaultBranch = master
[diff]
tool = meld
algorithm = histogram
colorMoved = plain
[color "diff"]
newMoved = 12 # pale blue
oldMoved = 5 # violet
[pull]
rebase = true
[merge]
tool = meld
conflictStyle = zdiff3
[difftool]
prompt = false
[difftool "vd"]
cmd = git-vdiff "$LOCAL" "$REMOTE"
[mergetool]
keepBackup = false
[advice]
waitingForEditor = false
[blame]
coloring = highlightRecent
date = human
[delta]
features = decorations
line-numbers-left-format = ""
line-numbers-right-format = "│ "
syntax-theme = none
[delta "decorations"]
commit-style = 3 # Yellow
file-decoration-style = 11 ul ol
file-style = 11 # Bold yellow
hunk-header-decoration-style = 4 box # Blue
hunk-header-style = 253 # White
minus-emph-style = 1 reverse
minus-style = 1 # Red
plus-emph-style = 2 reverse
plus-style = 2 # Green
zero-style = auto
[help]
format = html
[web]
browser = open
[alias]
# add
aa = add .
sg = !git add . -N && git add -p
# reset
unadd = reset HEAD
# commit
ci = commit
unci = reset --soft HEAD~1
amend = commit --amend
# restore
rs = restore
rss = restore --source
# branch
bb = bvv # Note, bvv is a custom subcommand, see the 'git-bvv' file.
bba = bvv --all
bd = branch -d
bD = branch -D
# switch
sw = switch
swc = switch -c
# checkout
co = checkout
# diff
di = diff
dip = !sh -c 'git di $1~1..$1' -
dis = diff --staged
mdi = difftool
mdip = !sh -c 'git difftool $1~1..$1' -
mdis = difftool --staged
vdi = difftool -t vd
vdip = !sh -c 'git difftool -t vd $1~1..$1' -
vdis = difftool -t vd --staged
# log
#
# #e3c78a (yellow), #ff5454 (red), #36c692 (green), #80a0ff (blue)
lla = "log --graph --date=human --format='%C(#e3c78a)%h%C(#ff5454)%d%C(reset) - %C(#36c692)(%ad)%C(reset) %s %C(#80a0ff){%an}%C(reset)'"
ll = lla --first-parent
# Handle repositories that use either 'master' or 'main' as their primary
# branch.
llm = "!_f() { if (git rev-parse --quiet --verify master > /dev/null); then git ll master..HEAD; else git ll main..HEAD; fi; }; _f"
llu = !git ll @{upstream}..HEAD
lld = !git ll HEAD..@{upstream}
# reflog
rl = reflog
# show
sh = show
# fetch
fe = fetch
fea = fetch --all --prune
# merge
mg = merge --ff-only
mgs = merge --ff-only --squash
unmg = reset --merge ORIG_HEAD
mgt = mergetool
# rebase
rb = rebase
rbc = rebase --continue
rbs = rebase --skip
# push / pull
ps = push
pl = pull
# remote
rau = remote add upstream
rr = remote -v
rro = remote show origin
rru = remote show upstream
# remote branch
bop = push -u origin
bod = push origin -d
# stash
sa = !sh -c 'git stash apply stash@{$1}' -
sd = !sh -c 'git stash drop stash@{$1}' -
si = !sh -c 'git stash show -p stash@{$1}' -
sl = stash list
sp = stash pop
ss = stash save --include-untracked
# bisect
bss = bisect start
bsb = bisect bad
bsg = bisect good
bsr = bisect reset
# misc
cloc = !cloc --vcs=git