dotfiles-ansible/roles/config/templates/git/config.j2

73 lines
1.9 KiB
Plaintext
Raw Normal View History

[core]
whitespace = trailing-space
autocrlf = input
{% if ssh_client == 'dropbear' %}
sshCommand = dbclient -y
{% endif %}
[user]
name = {{ user_name }}
email = {{ user_email }}
{% if ssh_client == 'openssh' and (gitcommit_sign_ssh | bool) %}
signingKey = {{ user_ssh_key_path | default('~/.ssh/id_ed25519') }}
[gpg]
format = ssh
{% else %}
signingKey = {{ user_gpg_signature }}
{% endif %}
[http]
sslVerify = true
[commit]
gpgSign = true
verbose = true
[rebase]
autoSquash = true
[pull]
rebase = true
[fetch]
prune = true
[init]
defaultBranch = main
templateDir = ~/.config/git/templates
[push]
followTags = true
[diff]
wsErrorHighlight = all
# mnemonicPrefix = true
# colorMoved = dimmed-zebra
[format]
useAutoBase = true
[color]
ui = true
[color "diff"]
meta = cyan
frag = magenta bold
commit = yellow bold
old = red
new = brightgreen
whitespace = red reverse
[web]
browser = xdg-open
[help]
autoCorrect = 1
[submodule]
recurse = true
[alias]
l = log --all --graph --pretty=format:'%C(yellow)%h%Creset %C(bold)<%an>%Creset -%C(bold)%C(green)%d%Creset %C(blue)%s%Creset (%cr)'
br = branch --sort=-committerdate --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) %(color:bold)<%(authorname)>%(color:reset) - %(color:blue)%(contents:subject)%(color:reset) (%(committerdate:relative))'
s = status -sbu
sbu = submodule update --remote --merge
redo = reset HEAD~1 --mixed
unstage = reset HEAD
wdiff = diff --word-diff
shallow = clone --single-branch --depth=1
compare = !git log $1...$2 --format='%C(bold)%C(green)%m%Creset %C(yellow)%h%Creset %C(bold)<%an>%Creset - %C(blue)%s%Creset' --left-right
# External, non-core functions
[sendemail]
annotate = true
[privacy]
ignoreTimezone = true
pattern = hms
# I should only work 2 hours a day (^-^) at noon
limit = 11-13