-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_gitconfig.tmpl
68 lines (58 loc) · 1.44 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
[core]
excludesFile = ~/.gitignore
[init]
defaultBranch = master
[color]
ui = auto
[pretty]
nice = "%C(yellow)%h%C(reset) %C(white)%s%C(cyan)%d%C(reset) -- %an; %ar"
[alias]
lo = log --pretty=nice
b = branch
ba = branch -a
ci = commit
co = checkout
d = diff
dc = diff --cached
fp = format-patch
g = !git gui &
gr = log --graph
go = log --graph --pretty=oneline --abbrev-commit
k = !gitk &
ka = !gitk --all &
lc = log ORIG_HEAD.. --stat --no-merges
lp = log --patch-with-stat
mnff = merge --no-ff
mt = mergetool
p = format-patch -1
serve = !git daemon --reuseaddr --verbose --base-path=. --export-all ./.git
sra = svn rebase --all
sh = !git-sh
st = status
stm = status --untracked=no
stfu = status --untracked=no
pullsrb = !git stash save && git pull --rebase && git stash pop && echo \\\"Success!\\\"
mffo = merge --ff-only
{{- $gpgCommand := (dig "gpg" "command" "gpg2" .) }}
{{- $gpgKeyID := (dig "gpg" "key_id" "" .) }}
{{- $gpgAutoSign := (dig "gpg" "autosign" false .) }}
[user]
name = {{ dig "git" "name" .name . }}
email = {{ dig "git" "email" .email . }}
{{- if (ne $gpgKeyID "")}}
signingkey = {{ $gpgKeyID }}
{{- end }}
[commit]
{{- if $gpgAutoSign }}
gpgsign = true
{{- end }}
[gpg]
{{- if (ne $gpgCommand "") }}
program = {{ $gpgCommand }}
{{- end }}
[http "https://gopkg.in"]
followRedirects = true
{{ range (split " " (dig "alt" "dirs" "" .)) }}
[includeIf "gitdir:{{ . }}/"]
path = ~/.gitconfig-alt
{{ end }}