forked from mhinz/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config
131 lines (123 loc) · 3.39 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
; Config {{{1
[user]
name = Marco Hinz
email = [email protected]
signingKey = D56EA60F557FD8B6
[core]
editor = nvr --remote-wait-silent
excludesfile = ~/.config/git/ignore
autocrlf = false
filemode = false
[init]
templatedir = ~/.config/git/template
defaultBranch = main
[commit]
gpgsign = true
[fetch]
prune = true
writeCommitGraph = true
[pull]
ff = only
[push]
default = current
followTags = true
[rebase]
autosquash = true
autostash = true
[tag]
sort = version:refname
[rerere]
enabled = true
[advice]
detachedHead = no
statusHints = no
[pack]
writeReverseIndex = true
[diff]
tool = nvr
algorithm = patience
mnemonicPrefix = true
compactionHeuristic = true
[difftool "nvr"]
cmd = nvr -sd $LOCAL $REMOTE
[merge]
tool = nvr
conflictstyle = diff3
[mergetool]
keepBackup = false
[mergetool "nvr"]
cmd = nvr -sd $LOCAL $BASE $REMOTE $MERGED -c 'winc J | winc ='
trustExitCode = true
; Aliases {{{1
[alias]
a = add
b = branch
bi = bisect
bl = blame
c = commit
ca = commit --amend
caa = commit --amend --no-edit
cf = commit --fixup
cl = clone
co = checkout
codate = "!f() { git checkout `git rev-list -n1 --before \"$@\" HEAD`; }; f"
cp = cherry-pick
d = diff --color --no-ext-diff
dc = !git d --cached
dcs = !git d --cached --stat
des = describe --contains
ds = !git d --stat
dt = difftool
dw = !git d --word-diff=color
f = fetch
g = grep
h = help
lfp = !git l --first-parent
ln = !git l @{1}..
ls = "!f() { git ls-files | grep "${@:-''}"; }; f"
lso = ls-files --others --exclude-standard
lsr = ls-remote
m = merge
ma = merge --abort
mt = mergetool
n = name-rev --name-only
p = push
pl = pull --ff-only
plr = pull --rebase origin master
r = reset
ra = rebase --abort
rc = rebase --continue
re = rebase
rem = remote
ri = rebase -i --keep-empty
rs = rebase --skip
ru = remote update
s = status --short --branch --untracked-files=no
sh = show
shs = show --stat
st = stash
stl = stash list
sts = stash show -p
t = tag
tr = trail
unmerged = branch --no-merged master
wt = worktree
rehook = "!f() { cd \"$(git rev-parse --show-toplevel)\"; rm -r .git/hooks; git init; }; f"
description = !git config --get "branch.$(git rev-parse --abbrev-ref HEAD).description"
snapshot = !git stash push "snapshot: $(date)" && git stash apply "stash@{0}"
ours = !git checkout --ours $@ && git add $@
theirs = !git checkout --theirs $@ && git add $@
rank = shortlog -sn --no-merges
authors = "!f() { git log --no-merges --pretty='format:%<(26)%an <%ae>' --author \"$*\" | sort | uniq; }; f"
by = "!f() { IFS=$'\n'; select a in `git authors \"$*\"`; do git l --no-merges --author \"${a%% *<*}\"; break; done; }; f"
upstream = !git for-each-ref --format='%(upstream:short)' $(git symbolic-ref -q HEAD)
upstream-remote = !git upstream | sed -e 's/\\/.*$//g'
; Colors {{{1
[color]
branch = auto
diff = auto
interactive = auto
status = auto
ui = auto
[include]
path = config.colors