-
Notifications
You must be signed in to change notification settings - Fork 1
/
private_dot_gitconfig.tmpl
60 lines (60 loc) · 1.75 KB
/
private_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
{{- if .is.windows }}
[gpg]
program = C:\\Program Files (x86)\\gnupg\\bin\\gpg.exe
{{- end }}
[core]
{{- if .is.windows }}
eol = lf
sshCommand = C:/Program\\ Files/OpenSSH-Win64/ssh.exe
autocrlf = false
symlinks = true
{{- end }}
editor = vim
[user]
email = {{ .git.main_email }}
name = {{ .git.main_name }}
signingkey = {{ get .gpg .gpg.default_key }}
[alias]
{{- if .is.windows }}
add-urls = !python '{{ .chezmoi.sourceDir | replace "\\" "\\\\" }}\\dot_local\\bin\\executable_git-add-urls'
{{- else }}
pushall = !git remote | xargs -L1 -I R git push R master
{{- end }}
{{/* https://stackoverflow.com/a/9726638 */}}
cas = commit --amend --date=now -S
lg = log --graph --oneline --decorate
lga = log --graph --oneline --decorate --all
lgs = log --show-signature
rbc = rebase --continue
rba = rebase --abort
cpc = cherry-pick --continue
cpa = cherry-pick --abort
sbu = submodule update --recursive --init
# https://stackoverflow.com/a/31776247
local-branches = "!git branch --format '%(refname:short) %(upstream:short)' | awk '{if (!$2) print $1;}'"
gone-branches = "!git branch -vv | awk '/: gone]/{print $1}'"
gone-branches-del = "!git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D"
[commit]
verbose = true
gpgsign = true
[pull]
rebase = true
[push]
default = current
autoSetupRemote = true
[init]
defaultBranch = master
[fetch]
prune = true
parallel = 0
[diff "ansible-vault"]
textconv = ansible-vault view
cachetextconv = false
[include]
path = ~/.config/override/git
[includeIf "gitdir:~/work/**/.git"]
path = ~/.gitconfig_work
[branch]
sort = -committerdate
[url "[email protected]"]
insteadOf = [email protected]