git: Update configuration

Some improvements taken from
https://jvns.ca/blog/2024/02/16/popular-git-config-options/#submodule-stuff
This commit is contained in:
Sanchayan Maity 2024-04-24 18:37:34 +05:30
parent cb46c82d53
commit 01749031fb
Signed by: sanchayanmaity
GPG key ID: 6F6A0609C12038F3

View file

@ -19,15 +19,19 @@
[color] [color]
ui = true ui = true
[commit] [commit]
cleanup = scissors
verbose = true verbose = true
[core] [core]
editor = nvim editor = nvim
excludesfile = ~/.config/git/ignore excludesfile = ~/.config/git/ignore
[diff] [diff]
tool = nvimdiff algorithm = histogram
colorMoved = zebra
colorMovedWS = allow-indentation-change
context = 10 context = 10
interHunkContext = 10 interHunkContext = 10
submodule = log submodule = log
tool = nvimdiff
[difftool] [difftool]
prompt = false prompt = false
trustExitCode = true trustExitCode = true
@ -38,6 +42,7 @@
[difftool "kitty"] [difftool "kitty"]
cmd = kitty +kitten diff $LOCAL $REMOTE cmd = kitty +kitten diff $LOCAL $REMOTE
[fetch] [fetch]
fsckObjects = true
prune = true prune = true
pruneTags = true pruneTags = true
[http] [http]
@ -47,13 +52,13 @@
[log] [log]
follow = true follow = true
[merge] [merge]
tool = nvimdiff1
conflictstyle = zdiff3 conflictstyle = zdiff3
ff = only ff = only
tool = nvimdiff1
[mergetool] [mergetool]
prompt = false
keepBackup = false
hideResolved = false hideResolved = false
keepBackup = false
prompt = false
[mergetool "nvimdiff1"] [mergetool "nvimdiff1"]
hideResolved = true hideResolved = true
[pager] [pager]
@ -74,8 +79,12 @@
smtpserver = /usr/bin/msmtp smtpserver = /usr/bin/msmtp
[stash] [stash]
showPatch = true showPatch = true
[status]
submoduleSummary = true
[submodule] [submodule]
recurse = true recurse = true
[tag]
sort = -taggerdate
[transfer] [transfer]
fsckObjects = true fsckObjects = true
[user] [user]