-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_gitconfig.tmpl
More file actions
102 lines (101 loc) · 2.71 KB
/
dot_gitconfig.tmpl
File metadata and controls
102 lines (101 loc) · 2.71 KB
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
[color]
ui = true
[color "branch"]
current = magenta reverse
local = magenta
remote = yellow
[alias]
amend = commit --amend
current = branch --show-current
last = diff HEAD^
uncommit = reset --soft HEAD^
filelog = log -u
changes = log --pretty=shortf --name-status
shortlog = log --pretty=shortlog
simple = log --pretty=simple
oneline = log --topo-order --pretty=one
brief = log --topo-order --pretty=brief
up = pull --rebase --autostash
sxs = -c delta.features=side-by-side diff
ddiff = -c diff.external=difft diff
dshow = -c diff.external=difft show --ext-diff
dlog = -c diff.external=difft log --ext-diff
# When you accidentally directly commit to main and need to undo onto a new branch
unmain = "!f(){ git reset --soft HEAD~1 && git pull && git checkout -b \"$1\"; }; f"
# Remove stale branches
cleanup = "!git remote prune origin && git branch -vv | grep \": gone]\" | awk \"{print \\$1}\" | xargs -I {} sh -c \"git branch -D {}\""
[format]
pretty = format:%C(bold)Commit:%C(reset) %C(yellow)%H%C(auto)%d%n%C(bold)Author:%C(reset) %C(cyan)%an <%ae>%n%C(bold)Date:%C(reset) %C(blue)%ad (%ar)%C(reset)%n%+B
[init]
defaultBranch = main
[pretty]
shortlog = format:%C(yellow)%h%C(reset) %C(cyan)%cr%C(reset) %cn %Cgreen%s%Creset
simple = format: * %s
one = format:%C(yellow)%h%C(reset) %s %Cgreen(%cr) %C(auto)%d%C(reset)
brief = format:%C(yellow)%h%C(reset) %s%n%C(blue)(%ar%C(reset) by %C(cyan)%an)%C(auto)%d%C(reset)%n
[merge]
verbosity = 1
tool = nvimdiff
conflictStyle = zdiff3
[mergetool]
prompt = false
keepBackup = false
keepTemporaries = false
[mergetool "nvimdiff"]
layout = "LOCAL,BASE,REMOTE / MERGED"
[apply]
whitespace = nowarn
[branch]
autosetupmerge = true
[push]
default = simple
autoSetupRemote = true
[core]
autocrlf = false
editor = nvim
pager = delta
quotepath = false
excludesfile = ~/.gitignore_global
ignorecase = true
[advice]
skippedCherryPicks = false
statusHints = false
[diff]
mnemonicprefix = true
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true # use n and N to move betweetn diff sections
line-numbers = true
[rerere]
enabled = true
[difftool]
prompt = false
[rebase]
autosquash = true
updateRefs = true
[log]
date = local
[pull]
ff = only
rebase = true
[fetch]
prune = true
prunereflogexpire = 30.days
prunetags = true
[user]
name = {{ .name }}
email = {{ .email }}
{{- if eq .chezmoi.os "darwin" }}
# GPG signing (Mac only for now)
[gpg]
format = ssh
[gpg "ssh"]
program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign"
allowedSignersFile = "~/.ssh/allowed_signers"
[commit]
gpgsign = true
[user]
signingkey = {{ .publicSigningKey }}
{{- end }}
# vim: ft=gitconfig