-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
184 lines (154 loc) · 5.84 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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
[user]
name = Tom Jordan
email = [email protected]
[include]
path = ~/.gitconfig.local
path = ~/.config/delta/themes.gitconfig
[init]
defaultBranch = main
[pretty]
compact=%h %ad, %s
f-lg1=%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)
f-lg1-1=%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)[%an]%C(reset)%C(auto)%d%C(reset)
f-lg2=%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n %C(white)%s%C(reset) %C(dim white)- %an%C(reset)
f-g=%C(yellow)%h%C(reset) - %s%d %C(dim white)- %an%C(reset)
f-q=%an, %h, %ar, %s
f-json={%n \"commit\": \"%H\",%n \"abbreviated_commit\": \"%h\",%n \"tree\": \"%T\",%n \"abbreviated_tree\": \"%t\",%n \"parent\": \"%P\",%n \"abbreviated_parent\": \"%p\",%n \"refs\": \"%D\",%n \"encoding\": \"%e\",%n \"subject\": \"%s\",%n \"sanitized_subject_line\": \"%f\",%n \"body\": \"%b\",%n \"commit_notes\": \"%N\",%n \"verification_flag\": \"%G?\",%n \"signer\": \"%GS\",%n \"signer_key\": \"%GK\",%n \"author\": {%n \"name\": \"%aN\",%n \"email\": \"%aE\",%n \"date\": \"%aD\"%n },%n \"committer\": {%n \"name\": \"%cN\",%n \"email\": \"%cE\",%n \"date\": \"%cD\"%n }%n},
[alias]
mr = !sh -c 'git fetch $1 merge-requests/$2/head:mr-$1-$2 && git checkout mr-$1-$2' -
visual = !gitk
st = status -s
stu = status -s --untracked-files all .
co = checkout
sco = sparse-checkout
ci = commit
br = branch
cp = cherry-pick
up = pull --prune
gr = !cd $(git rev-parse --show-toplevel)
d = difftool
dt = difftool
deleted = log --diff-filter=D --summary
di = diff
dif = diff
dd = !git diff | delta
ddc = !git diff --cached | delta
gh = !gh
# log bases
lg-base = log --graph --abbrev-commit
lg-base-decorate = !git lg-base --decorate
# log builds
lg1 = !git lg-base-decorate --date=relative --format=f-lg1 --all
lg2 = !git lg-base-decorate --format=f-lg2 --all
lg3 = !git lg-base-decorate --pretty=oneline --stat
lg4 = !git lg-base --pretty=oneline --stat
lg5 = log --oneline --reverse
lgg = !git lg-base-decorate --format=f-g
# interesting diffs
ds = diff --staged
wd = diff --word-diff --ignore-all-space
wds = !git wd --staged
# current branch name
current-br = !git branch --show-current
# incoming changes - like hg
incoming = !git fetch && git lg3 $(git current-br)..origin/$(git current-br)
in = !git incoming
in-diff = !git fetch && git diff $(git current-br)..origin/$(git current-br)
# outgoing changes - like hg
outgoing = !git lg3 origin/$(git current-br)..$(git current-br)
out = !git outgoing
out-diff = !git diff origin/$(git current-br)..$(git current-br)
# make remote braches local
remote-local = $(!git br -a | sed "s;remotes/origin/;;" | grep -v master | xargs -Isnip git co snip)
tags = for-each-ref --sort=taggerdate --format=\"%(color:green)%(subject)%(color:reset), tagged: %(refname:short)\n%(taggerdate)\n%(taggername) %(taggeremail)\n\n%(contents:body)\n\" refs/tags
taghist = for-each-ref --format=\"%(refname:short) %(taggerdate) %(subject) %(body)\" refs/tags
tags2 = for-each-ref --sort=taggerdate --format=\"%(color:yellow)%(refname:short)%(color:reset)\n%>(4)%(color:green)%(subject)%(color:reset)\nTagger:\t%(taggername) %(taggeremail)\nDate:\t%(taggerdate)\n\n%(*body)\n\" refs/tags
[core]
editor = nvim
excludesfile = ~/.gitignore_global
commentchar = :
[push]
default = simple
[fetch]
prune = true
[pull]
rebase = false
[pager]
tag = off
branch = off
# diff = delta
; show = delta
; log = nvim
; log = delta
; reflog = delta
[color "decorate"]
HEAD = red
[difftool]
prompt = false
[difftool "difftastic"]
cmd = difft "$LOCAL" "$REMOTE"
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[interactive]
diffFilter = delta --color-only
[merge]
conflictstyle = diff3
[diff]
tool = difftastic
colorMoved = default
[delta]
features = default decorations side-by-side
; features = default collared-trogon
; features = default coracias-caudatus
; features = default tangara-chilensis
; features = default villsau
; features = default wooly-mammoth
; whitespace-error-sytle = 22 reverse
[delta "default"]
line-numbers = true
zero-style = dim
; syntax-theme = tangara-chilensis
; true-color = never
; file-style = bold yellow
; file-decoration-style = none
navigate = true
; commit-decoration-style = ol
; hunk-header-file-style = cyan
; hunk-header-line-number-style = cyan
; hunk-header-style = file line-number
; hunk-header-style = omit
; hunk-header-style = cyan auto file
; hunk-header-decoration-style = cyan ul
; hunk-header-decoration-style = cyan box
; hunk-header-decoration-style = cyan
; tabs = 2
; line-numbers-minus-style = 124
; line-numbers-minus-style = "#444444"
; line-numbers-plus-style = "#444444"
; line-numbers-plus-style = 28
; line-numbers-left-style = cyan
; line-numbers-right-style = cyan
; minus-style = auto "#AB4642"
; minus-style = "#AB4642" "#A16946"
; minus-style = syntax bold auto
[delta "side-by-side"]
side-by-side = true
line-numbers-left-format = "{nm:>4} "
line-numbers-right-format = "{np:>4} "
[delta "decorations"]
commit-decoration-style = bold yellow box ul
file-style = bold yellow ul
file-decoration-style = none
; hunk-header-decoration-style = yellow box
hunk-header-decoration-style = yellow
; hunk-header-decoration-style = yellow ol
; hunk-header-style = omit