From 0e10ce31e15ba31a691c275f1ab7b3ef5ba077e2 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Sun, 18 Feb 2024 02:08:02 +0100 Subject: [PATCH] improve git config https://jvns.ca/blog/2024/02/16/popular-git-config-options/ --- dot_config/git/private_config.tmpl | 33 ++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/dot_config/git/private_config.tmpl b/dot_config/git/private_config.tmpl index 9718b50..0b7f7fd 100644 --- a/dot_config/git/private_config.tmpl +++ b/dot_config/git/private_config.tmpl @@ -10,6 +10,7 @@ [push] default = simple autoSetupRemote = true + followtags = true [help] autocorrect = immediate {{- if hasKey . "proxy" }} @@ -46,8 +47,12 @@ pushnoci = push -o ci.skip diffs = diff --staged restores = restore --staged +[commit] + verbose = true +[rerere] + enabled = true [core] - editor = vim + editor = nvim attributesfile = {{ .chezmoi.homeDir }}/.gitattributes autocrlf = input [sendemail] @@ -57,9 +62,20 @@ smtpserverport = 465 smtppass = {{ (bitwarden "item" "Migadu email").login.password | quote }} confirm = auto +[submodule] + recurse = true +[fetch] + prune = true + prunetags = true +[log] + date = iso +[status] + submoduleSummary = true [diff] colorMoved = default algorithm = histogram + submodule = log + tool = nvimdiff [diff "color"] textconv=pygmentize [diff "pandoc2md"] @@ -71,11 +87,17 @@ [diff "ziplist"] textconv=unzip -l [merge] - conflictstyle = diff3 + conflictstyle = zdiff3 + tool = nvimdiff [pull] rebase = true +[rebase] + autosquash = true + autostash = true [init] defaultBranch = master +[branch] + sort = -committerdate [advice] detachedHead = false [filter "lfs"] @@ -89,5 +111,12 @@ [tag] sort = version:refname +[url "git@github.com:"] + insteadOf = "https://github.com/" + insteadOf = "gh:" + +[credential] + helper = osxkeychain + [include] path = ovh.config