-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_gitconfig.tmpl
64 lines (52 loc) · 1.97 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
[user]
email = [email protected]
name = Kevin Tindall
signingkey = ~/.ssh/id_rsa
[github]
user = kevinkjt2000
[gpg]
format = ssh
[commit]
gpgsign = true
[core]
{{- if lookPath "nvim" }}
editor = nvim
{{- end }}
excludesfile = ~/.config/gitignore_global
{{- if lookPath "diff-so-fancy" }}
pager = "diff-so-fancy | less --tabs=4 -RFX"
{{- end }}
[credential]
helper = /usr/lib/git-core/git-credential-libsecret
[alias]
aa = add --all
amend = commit --amend
cleanup = "!default_branch=$(git default-branch); git remote prune origin && git checkout -q $default_branch && git for-each-ref refs/heads/ '--format=%(refname:short)' | while read branch; do mergeBase=$(git merge-base $default_branch $branch) && [[ $(git cherry $default_branch $(git commit-tree $(git rev-parse $branch^{tree}) -p $mergeBase -m _)) == '-'* ]] && git branch -D $branch; done"
{{- if lookPath "gxargs" }}
cleanup-merged = "!default_branch=$(git default-branch); git branch --merged $default_branch | grep -v $default_branch | gxargs --no-run-if-empty git branch -d"
{{- else }}
cleanup-merged = "!default_branch=$(git default-branch); git branch --merged $default_branch | grep -v $default_branch | xargs --no-run-if-empty git branch -d"
{{- end }}
co = checkout
ci = commit
ctags = "!${GIT_DIR}/hooks/ctags"
dc = diff --cached
default-branch = "!git remote show origin | awk '/HEAD branch/ {print $NF}'"
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
mff = merge --ff-only
my-branches = !git branch --format='%(refname:short)' | xargs -I{} sh -c 'git branch -a | grep "remotes/origin/{}"'
patch = !git --no-pager diff --no-color
pff = pull --ff-only
[gui]
gcwarning = false
[init]
templatedir = ~/.config/git/template
[includeIf "gitdir:~/repos/work/"]
path = ~/repos/work/.gitconfig
[rerere]
autoupdate = true
enabled = true
[hub]
protocol = ssh
[pull]
ff = only