-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_gitconfig.tmpl
More file actions
42 lines (42 loc) · 1.27 KB
/
dot_gitconfig.tmpl
File metadata and controls
42 lines (42 loc) · 1.27 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
{{- $gpgKeyPersonalEmail := get . "gpgKeyPersonalEmail" -}}
{{- $workGitHubOrg := get . "workGitHubOrg" -}}
[alias]
shit = commit --amend --no-edit
fuck = "!f(){ git shit && git push -f; };f"
ignore = "!f() { echo \"$1\" >> .gitignore; }; f"
ls = log --pretty=format:"%C(yellow)%h\\ %Creset%s%Cblue\\ [%cn]\\%Cred%d" --decorate
ll = ls --numstat
last = --no-pager log -1 --oneline --color
nuke = "!f(){ git reset --hard && git clean -fd; };f"
stash-unstaged = stash --keep-index -u
[user]
name = {{ .gitName }}
email = {{ .personalEmail }}
{{- if ne $gpgKeyPersonalEmail "" }}
signingkey = {{ $gpgKeyPersonalEmail }}
{{- end }}
{{ if eq .machineType "work" -}}
{{- if ne $workGitHubOrg "" }}
[includeIf "hasconfig:remote.*.url:git@github.com:{{ $workGitHubOrg }}/**"]
path = ~/.attio.gitconfig
[includeIf "hasconfig:remote.*.url:ssh://git@github.com/{{ $workGitHubOrg }}/**"]
path = ~/.attio.gitconfig
[includeIf "hasconfig:remote.*.url:https://github.com/{{ $workGitHubOrg }}/**"]
path = ~/.attio.gitconfig
{{- end }}
{{ end -}}
[init]
defaultBranch = master
[push]
default = current
{{- if ne $gpgKeyPersonalEmail "" }}
[commit]
gpgsign = true
[gpg]
program = gpg
[tag]
forceSignAnnotated = true
{{- end }}
[pull]
default = current
rebase = false