From 38d84331d13a1ba2f9c93ef932782bd2b4f8c25f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Jane=C5=BEi=C4=8D?= Date: Mon, 9 Mar 2026 22:20:58 +0100 Subject: [PATCH] feat(git): enable some sensible defaults --- git/config | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/git/config b/git/config index f3d39b5..9e6ea7a 100644 --- a/git/config +++ b/git/config @@ -5,6 +5,7 @@ [commit] gpgsign = true + verbose = true ; NOTE:(@janezicmatej) github/gitlab don't support these ; [push] @@ -17,14 +18,16 @@ [init] defaultBranch = main -[diff] - tool = nvimdiff +[rebase] + updateRefs = true -[difftool "nvimdiff"] - cmd = nvim -d "$LOCAL" "$REMOTE" +[rerere] + enabled = true + autoUpdate = true [merge] tool = nvimdiff + conflictStyle = zdiff3 [mergetool] keepBackup = false @@ -33,8 +36,26 @@ [mergetool "nvimdiff"] layout = "LOCAL,BASE,REMOTE / MERGED" +[diff] + tool = nvimdiff + algorithm = histogram + colorMoved = plain + mnemonicPrefix = true + +[difftool "nvimdiff"] + cmd = nvim -d "$LOCAL" "$REMOTE" + [alias] - blame = "!f() { [ -f .git-blame-ignore-revs ] && git blame --ignore-revs-file .git-blame-ignore-revs \"$@\" || git blame \"$@\"; }; f" + blame-ignore = "config blame.ignoreRevsFile .git-blame-ignore-revs" + +[branch] + sort = -committerdate + +[tag] + sort = version:refname + +[help] + autoCorrect = prompt [maintenance] auto = true