I'm reading How Core Git Developers Configure Git, which I had found a while ago but forgot about.
I've decided to apply these settings:
git config --global branch.sort -committerdate
git config --global tag.sort version:refname
git config --global diff.algorithm histogram
git config --global diff.colorMoved plain
git config --global diff.mnemonicPrefix true
git config --global diff.renames true
git config --global push.autoSetupRemote true
git config --global push.followTags true
git config --global fetch.prune true
git config --global fetch.pruneTags true
git config --global fetch.all true
git config --global commit.verbose true
My git config looks like this now:
[filter "lfs"]
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
[init]
defaultBranch = main
[core]
editor = nvim
[push]
autoSetupRemote = true
followTags = true
[branch]
sort = -committerdate
[tag]
sort = version:refname
[diff]
algorithm = histogram
colorMoved = plain
mnemonicPrefix = true
renames = true
[fetch]
prune = true
pruneTags = true
all = true
[commit]
verbose = true
I recall that some settings in here were set before, probably with the following commands:
git lfs install
git config --global init.defaultBranch main
git config --global core.editor nvim