improve git config

https://jvns.ca/blog/2024/02/16/popular-git-config-options/
This commit is contained in:
Gabriel Augendre 2024-02-18 02:08:02 +01:00
parent f3bacd1462
commit 0e10ce31e1

View file

@ -10,6 +10,7 @@
[push] [push]
default = simple default = simple
autoSetupRemote = true autoSetupRemote = true
followtags = true
[help] [help]
autocorrect = immediate autocorrect = immediate
{{- if hasKey . "proxy" }} {{- if hasKey . "proxy" }}
@ -46,8 +47,12 @@
pushnoci = push -o ci.skip pushnoci = push -o ci.skip
diffs = diff --staged diffs = diff --staged
restores = restore --staged restores = restore --staged
[commit]
verbose = true
[rerere]
enabled = true
[core] [core]
editor = vim editor = nvim
attributesfile = {{ .chezmoi.homeDir }}/.gitattributes attributesfile = {{ .chezmoi.homeDir }}/.gitattributes
autocrlf = input autocrlf = input
[sendemail] [sendemail]
@ -57,9 +62,20 @@
smtpserverport = 465 smtpserverport = 465
smtppass = {{ (bitwarden "item" "Migadu email").login.password | quote }} smtppass = {{ (bitwarden "item" "Migadu email").login.password | quote }}
confirm = auto confirm = auto
[submodule]
recurse = true
[fetch]
prune = true
prunetags = true
[log]
date = iso
[status]
submoduleSummary = true
[diff] [diff]
colorMoved = default colorMoved = default
algorithm = histogram algorithm = histogram
submodule = log
tool = nvimdiff
[diff "color"] [diff "color"]
textconv=pygmentize textconv=pygmentize
[diff "pandoc2md"] [diff "pandoc2md"]
@ -71,11 +87,17 @@
[diff "ziplist"] [diff "ziplist"]
textconv=unzip -l textconv=unzip -l
[merge] [merge]
conflictstyle = diff3 conflictstyle = zdiff3
tool = nvimdiff
[pull] [pull]
rebase = true rebase = true
[rebase]
autosquash = true
autostash = true
[init] [init]
defaultBranch = master defaultBranch = master
[branch]
sort = -committerdate
[advice] [advice]
detachedHead = false detachedHead = false
[filter "lfs"] [filter "lfs"]
@ -89,5 +111,12 @@
[tag] [tag]
sort = version:refname sort = version:refname
[url "git@github.com:"]
insteadOf = "https://github.com/"
insteadOf = "gh:"
[credential]
helper = osxkeychain
[include] [include]
path = ovh.config path = ovh.config