-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathdot_gitconfig.tmpl
120 lines (93 loc) · 3.48 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
# -*-mode:gitconfig-*- vim:ft=gitconfig
# ~/.gitconfig
# =============================================================================
# User-specific Git configuration file.
#
# See https://git-scm.com/docs/git-config
#
# {{- /* This file supports Go's text/template language. */ -}}
#
# Sources:
# https://delicious-insights.com/en/posts/mastering-git-submodules/
# https://github.com/haacked/dotfiles
# https://github.com/holman/dotfiles
# https://github.com/jayharris/dotfiles-windows
# https://github.com/mathiasbynens/dotfiles
# https://git-scm.com/docs/git-config/
[apply]
# Detect whitespace errors when applying a patch.
whitespace = fix
[commit]
# Specify template file for new commit messages.
template = ~/.gitmessage.txt
[core]
# Disable line endings output conversion.
autocrlf = input
# Set comment character to something that allows mentioning issue numbers.
commentChar = ";"
# Store global exclusions into a custom file.
excludesfile = ~/.gitignore_global
# Make `git rebase` safer on macOS.
# See http://www.git-tower.com/blog/make-git-rebase-safe-on-osx/
trustctime = false
# Speed up commands involving untracked files such as `git status`.
# See https://git-scm.com/docs/git-update-index#_untracked_cache
untrackedCache = true
[diff]
# List submodules commits in the range.
submodule = log
[difftool "sourcetree"]
# Specify the command to invoke Sourcetree.
{{ if eq .chezmoi.os "darwin" -}}
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
{{ else if eq .chezmoi.os "windows" -}}
cmd = '' \"$LOCAL\" \"$REMOTE\"
{{- end }}
# Disable the prompt before each invocation of the diff tool.
prompt = false
[fetch]
# Remove any remote-tracking references that no longer exist on the remote.
prune = true
[filter "lfs"]
# Specify the command to convert a worktree file's content to a blob upon checkin.
clean = git-lfs clean -- %f
# Convert between Large File Storage pointer and actual content.
process = git-lfs filter-process
# Specify the command to convert a blob object's content to a worktree file upon checkout.
smudge = git-lfs smudge -- %f
# Turn a content that by itself is unusable into a usable content.
required = true
[help]
# Correct and execute mistyped commands.
autocorrect = 1
[merge]
# Include summaries of merged commits in newly created merge commit messages.
log = true
[mergetool]
# Avoid saving an `.orig` backup file after a merge.
keepBackup = false
[mergetool "sourcetree"]
# Specify the command to invoke Sourcetree.
{{ if eq .chezmoi.os "darwin" -}}
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
{{ else if eq .chezmoi.os "windows" -}}
cmd = '' \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
{{- end }}
# Use the exit code of the merge command to determine the success status.
trustExitCode = true
[rebase]
# Create a temporary stash entry before the operation begins.
autostash = true
[status]
# Enable submodule summary of commits.
submoduleSummary = true
[user]
# Specify the email address of the author/committer.
email = "{{ .email }}"
# Specify the username of the author/committer.
name = "{{ .name }}"
[include]
# Include aliases.
path = .gitconfig_aliases
# Include extra configuration (if any).
path = .gitconfig_local