-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdot_gitconfig.tmpl
169 lines (140 loc) · 3.96 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
[user]
name = Arran Ubels
useConfigOnly = true
[init]
defaultBranch=main
[core]
autocrlf = input
editor = vim
excludesfile = {{ .chezmoi.homeDir}}/.gitignore
longpaths = true
# quotepath = false # Unicode characters
{{ if lookPath "vimdiff" }}
pager = delta
{{ end }}
[rerere]
enabled = 1
[credential "https://github.com"]
useHttpPath = true
[credential]
{{ if index . "headless" }}
credentialStore = cache
cacheOptions = "--timeout 14400"
helper = {{ index $ "gitCredentialManagerLocation" }}
{{ else if eq .chezmoi.os "linux" }}
{{ if eq .chezmoi.osRelease.id "ubuntu" }}
credentialStore = secretservice
helper = {{ index $ "gitCredentialManagerLocation" }}
{{ else if eq .chezmoi.osRelease.id "gentoo" }}
credentialStore = secretservice
helper = {{ index $ "gitCredentialManagerLocation" }}
{{ end}}
{{ else }}
helper = manager
{{ end }}
[credential "https://dev.azure.com"]
useHttpPath = true
[credential "https://git.assembla.com"]
useHttpPath = true
{{ if eq .chezmoi.os "windows" }}
[gpg]
program = "{{ index . "gpgLocation" }}"
{{ end }}
[credential "https://source.developers.google.com"]
provider = generic
[credential "https://gitlab.arran.net.au"]
# provider = generic
# provider = gitlab
gitLabAuthModes = pat
# gitLabDevClientId = FUCK
# gitLabDevClientSecret FUCK
{{ if ne .chezmoi.os "windows" }}
[color]
branch = auto
diff = auto
interactive = auto
status = auto
ui = auto
[color "branch"]
current = green
remote = yellow
{{ end }}
[merge]
# Include summaries of merged commits in newly created merge commit messages
log = true
# Should probably use a script to select here.
{{ if and (index . "headless") (stat (index . "vimdiffLocation" ) ) }}
tool = {{index . "vimdiffLocation"}}
conflictstyle = diff3 # show original content before conflicts
{{ else if and (eq .chezmoi.os "linux") (stat (index . "kdiff3Location" ) ) }}
tool = {{index . "kdiff3Location" }}
conflictstyle = diff3 # show original content before conflicts
{{ else if stat (index . "vimdiffLocation") }}
conflictstyle = diff3 # show original content before conflicts
tool = {{ index . "vimdiffLocation" }}
{{ end }}
[mergetool "kdiff3"]
trustExitCode = false
{{ if eq .chezmoi.os "darwin" }}
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
{{end}}
[diff]
{{ if and (index . "headless") (stat (index . "vimdiffLocation" ) ) }}
tool = {{ index . "vimdiffLocation" }}
{{ else if and (eq .chezmoi.os "linux") (stat (index . "kdiff3Location" )) }}
tool = {{ index . "kdiff3Location" }}
{{ else if stat (index . "vimdiffLocation" ) }}
tool = {{ index . "vimdiffLocation" }}
{{ end }}
colorMoved = default
[difftool]
prompt = true
[difftool "kdiff3"]
trustExitCode = false
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[difftool "vscode"]
cmd = code --wait --diff $LOCAL $REMOTE
[difftool "nvimdiff"]
cmd = "nvim -d \"$LOCAL\" \"$REMOTE\""
[difftool "difftastic"]
cmd = difft "$LOCAL" "$REMOTE"
[commit]
{{ if index . "gpgconfigured" }}
gpgsign = true
{{ end }}
template = ~/.config/git/message
status = true
[tag]
{{ if index . "gpgconfigured" }}
gpgsign = true
{{ end }}
# template = ~/.config/git/tagmessage
[push]
{{ if index . "gpgconfigured" }}
gpgsign = if-asked
{{ end }}
followTags = true
[alias]
#via http://stackoverflow.com/questions/5188320/how-can-i-get-a-list-of-git-branches-ordered-by-most-recent-commit
recent-branches = !git for-each-ref --count=15 --sort=-committerdate refs/heads/ --format='%(refname:short)'
#[include]
# path = ~/.gitconfig.local # Allow for local overrides
[grep]
lineNumber = true
patternType = extended
[man]
viewer = less
[delta]
navigate = true
[interactive]
diffFilter = delta --color-only
[http]
cookiefile = ~/.cache/git/cookies
[status]
submodulesummary = true
[advice]
statusHints = false