-
Notifications
You must be signed in to change notification settings - Fork 7
/
dot_gitconfig.tmpl
79 lines (69 loc) · 2.03 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
[user]
name = joe miller
email = joeym@joeym.net
[core]
excludesfile = ~/.gitignore-global
[color]
# Use colors in Git commands that are capable of colored output when outputting to the terminal
ui = auto
[color "branch"]
current = red reverse
local = red
remote = green
[color "status"]
added = yellow
changed = green
untracked = cyan
[github]
user = joemiller
[alias]
l = log --stat
ll = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --stat
up = "!git remote update -p; git merge --ff-only @{u}"
co = checkout
ci = commit
s = status
ss = status -sb
p = push
pf = push --force-with-lease
# https://csswizardry.com/2017/05/little-things-i-like-to-do-with-git/
# https://github.com/csswizardry/csswizardry.github.com/issues/66
stats = shortlog -sn
overview = log --all --oneline --no-merges
graph = log --graph --all --decorate --stat --date=iso
delete-merged = "!git branch --merged | grep -v \"^\\s*master$\" | grep -v \"\\*\" | xargs -n 1 git branch -d"
[push]
default = current
autosetupremote = true
[gpg]
program = gpg
[init]
defaultBranch = main
[branch]
sort = -committerdate
[diff]
algorithm = histogram
[merge]
conflictstyle = diff3
[url "git@github.com:planetscale"]
insteadOf = https://github.com/planetscale
[includeIf "gitdir:~/git/planetscale/"]
path = ~/.gitconfig-pscale
# -- git commit signing -- #
[commit]
gpgSign = true
[gpg "ssh"]
allowedSignersFile = ~/.ssh/allowed_git_signers
{{/* on some machines, use gpg */}}
{{- if eq .chezmoi.hostname "macbook-joe" }}
[gpg]
program = gpg
[user]
signingkey = 0B148DEB3B16BA35!
{{/* on all other machines, fall back to using ssh key from a yubikey. this forwards over ssh whereas gpg does not forward well */}}
{{- else }}
[gpg]
format = ssh
[user]
signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFORz4M70y8FEA4EUEgLOowZk0Z1eOAKkuwk6vwZnVze cardno:11_507_367
{{- end }}