-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_gitconfig.tmpl
175 lines (144 loc) · 3.37 KB
/
dot_gitconfig.tmpl
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
# Managed by chezmoi, so edit this file in the 'dotfiles' repo, not locally.
#
# This is Git's per-user configuration file.
[advice]
addIgnoredFile = false
[branch]
autoSetupMerge = simple
[color]
branch = auto
diff = auto
status = auto
ui = auto
[color "branch"]
current = green reverse
local = green
plain = white
remote = yellow
upstream = blue
# Debian 10 -> git 2.20 apparently doesn't have bright colours, so we use bold there instead
[color "diff"]
frag = magenta bold
{{- if eq .chezmoi.os "linux" }}
func = blue bold
new = green bold
old = red bold
{{- else }}
func = brightblue
new = brightgreen
old = brightred
{{- end }}
newMoved = green
oldMoved = red
[color "status"]
{{- if eq .chezmoi.os "linux" }}
branch = magenta bold
localBranch = magenta bold
remoteBranch = magenta bold
{{- else }}
branch = brightmagenta
localBranch = brightmagenta
remoteBranch = brightmagenta
{{- end }}
changed = red
header = white
unmerged = blue
untracked = yellow
updated = green
[commit]
{{- if lookPath "op" }}
gpgsign = true
{{- end }}
template = {{ .chezmoi.homeDir }}/.gitmessage
[core]
{{- if eq .chezmoi.os "windows" }}
autocrlf = true
{{- else }}
autocrlf = input
{{- end }}
editor = nano
excludesfile = ~/.gitignore.global
pager = delta
[credential]
{{- if eq .chezmoi.os "darwin" }}
helper = osxkeychain
{{- else if eq .chezmoi.os "linux" }}
helper = cache
{{- end }}
[delta]
hyperlinks = true
light = false # set to true if you're in a terminal w/ a light background color (e.g. the default macOS terminal)
line-numbers = true
navigate = true # use n and N to move between diff sections
side-by-side = false
tabs = 2
features = decorations line-numbers
syntax-theme = Dracula
plus-style = syntax "#003800"
minus-style = syntax "#3f0001"
[delta "decorations"]
commit-decoration-style = bold yellow box ul
file-style = bold yellow ul
file-decoration-style = none
hunk-header-decoration-style = cyan box ul
[delta "line-numbers"]
line-numbers-left-style = cyan
line-numbers-right-style = cyan
line-numbers-minus-style = 124
line-numbers-plus-style = 28
[delta "paging-never"]
paging = never
[diff]
colorMoved = default
renameLimit = 100000
renames = copies
[help]
autocorrect = 30
[http]
cookiefile = {{ .chezmoi.homeDir }}/.gitcookies
postBuffer = 157286400
[include]
path = {{ .chezmoi.homeDir }}/.gitconfig.aliases
[init]
defaultBranch = main
[interactive]
diffFilter = delta --color-only
[merge]
conflictstyle = diff3
[pager]
blame = delta
grep = delta
[pull]
rebase = false
[push]
autoSetupRemote = true
default = simple
followTags = true
[stash]
showPatch = true
showStat = true
[user]
name = James Lucktaylor
{{- if lookPath "op" }}
email = {{ onepasswordRead "op://Personal/GitHub/public e-mail address" "my.1password.com" | trim }}
signingkey = {{ onepasswordRead "op://Personal/GitHub/GPG signing key" "my.1password.com" | trim }}
{{- end }}
useConfigOnly = true
# https://github.com/lyze/posh-git-sh#configuration-options
[bash]
branchBehindAndAheadDisplay = full
describeStyle = branch
enableFileStatus = true
enableGitStatus = true
enableStashStatus = true
enableStatusSymbol = true
showStatusWhenZero = false
showUpstream = git
# https://hub.github.com/hub.1.html
[hub]
protocol = https
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true