forked from farzadghanei/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_gitconfig.tmpl
More file actions
44 lines (44 loc) · 938 Bytes
/
dot_gitconfig.tmpl
File metadata and controls
44 lines (44 loc) · 938 Bytes
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
[user]
name = {{ .name }}
email = {{ .email }}
[core]
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore_global
autocrlf = false
{{- if eq .chezmoi.os "darwin" }}
editor = hx
{{- end }}
[color]
ui = auto
diff = auto
branch = auto
status = auto
[pull]
rebase = false
[push]
default = current
autoSetupRemote = true
[fetch]
prune = true
[alias]
upstream-name = !git remote | grep -Eo '(upstream|origin)' | tail -1
head-branch = !git remote show $(git upstream-name) | awk '/HEAD branch/ {print $NF}'
[init]
{{- if eq .chezmoi.os "darwin" }}
defaultBranch = main
{{- else }}
defaultBranch = master
{{- end }}
[tag]
sort = version:refname
[diff]
colorMoved = plain
renames = true
[branch]
sort = -committer-date
{{- if eq .chezmoi.os "darwin" }}
[credential]
helper = store
[safe]
directory = *
{{- end }}