-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
121 lines (119 loc) · 2.98 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
[alias]
ap = add --patch
b = branch -vv
caa = !bash -c 'git commit --amend -a -C HEAD --cleanup=strip \"$@\"' _
caan = caa -n
cd = ci -m Documentation
cda = cd -a
cf = cwip -m 'Trivial reformat'
cfa = cf -a
ci = commit
ciam = ci -am
cl = cwip -m 'Fix lint issues'
cla = cl -a
co = checkout
cp = cherry-pick
cpx = cp -x
cr = cwip -m 'Trivial refactor'
cra = cr -a
cs = cwip -m 'Sanity Check'
csa = cs -a
cw = cwip -m 'Whitespace'
cwa = cw -a
cwip = ci --trailer type:wip
d = diff
dc = diff --cached
dn = diff --numstat
dno = diff --name-only
dw = diff --word-diff
dwa = diff --word-diff-regex=.
exec = "!exec " # execute a shell command in the top level
l = l1
# Set t to a comma separated list of trailers to be
# displayed in the log output The idea here is that you can
# specify trailers with 'git config core.default-trailers'
# or override with t at the command line. eg, set 'git
# config core.default-trailers ticket' to show the ticket
# in the log, or use 't=ticket,style g l1' to show both
# the ticket adn the style trailer in the log, or 't= g l1'
# to show none.
l1 = !bash -c 'cd ${GIT_PREFIX:-.} && \
trailers=${t-$(git config core.default-trailers || :)} && \
width=${w-$(git config core.default-trailer-width || echo 11)} && \
trailer_fmt=$(printf \"%s\" "${trailers}" | \
sed -E \"s/([^,]*)(\\$|,)/ [%<(${width})%(trailers:key=\\1,separator=%x2C,valueonly)]/g\" \
) && \
git log \
--date=format:\"\" \
--format=tformat:\"$(printf \"%s\" \"\
%C(green)%h\
%C(yellow)% ad\
%C(red)%<(${GITLOG_AUTHOR_WIDTH:-$(git config log.author-width \
2> /dev/null || echo 12)},trunc)% an\
%Creset${trailer_fmt}\
%<($(($(tput cols) / 3)),trunc)% s \
%Cblue% D\
%Creset\
\" \
| sed -E \"s/ +//g\" \
)\" \
\"$@\"' _
l1a = l1 --graph --decorate
l1ah = l1 -n 10 --graph --decorate
l1h = l1 -n 10
la = l1 --graph --decorate # same as l1a
ld = l1 --date=format:'%FT%T%z'
ldh = ld -n 10
ls = l1 --show-signature
no = show --name-only --pretty=format:
s = status
sa = status -uall --ignored
sk = !bash -c 'git stash push --keep-index ${1:+-m \"${*}\"}' _
sl = stash list
sp = stash pop --quiet
ss = !bash -c 'git stash push ${1:+-m \"${*}\"}' _
w = rev-parse --abbrev-ref HEAD
[apply]
whitespace = error
[core]
# whitespace = tab-in-indent
whitespace = indent-with-non-tab
editor = vim
default-trailers = type
default-trailer-width = 3
[push]
default = upstream
autoSetupRemote = true
[pager]
status = true
[init]
defaultBranch = main
[versionsort]
prereleaseSuffix = .rc
[color "branch"]
meta = red green bold
[color]
branch = true
[pull]
rebase = true
[advice]
detachedHead = false
[tag]
gpgSign = true
[commit]
gpgSign = false
[include]
path = ~/.gitconfig-local
[merge]
tool = vimdiff
[status]
showUntrackedFiles = no
[diff]
wsErrorHighlight = all
# ignoreSubmodules = all # ignore with --ignore-submodules=none
[submodule]
recurse = true
[color "diff"]
whitespace = red reverse
[log]
follow = true