How Core Git Developers Configure Git

Interesting discussion of git config options that the git core developers favor and that are not (yet) defaults. There are some nice suggestions. For example, I didn’t know that

1git config --global push.autoSetupRemote true

existed. If you haven’t defined an upstream for a branch yet, git will automatically set it for you. So you don’t have to run

1git push --set-upstream origin my-branch-name

anymore.

Some other options I adopted from this post:

 1# sort branches by last committed date
 2git config --global branch.sort -committerdate 
 3# sort tags by tag-number not alphabetically
 4git config --global tag.sort version:refname   
 5# better diff algorithm than the default myers
 6git config --global diff.algorithm histogram
 7# color moved code differently than added code in diffs
 8git config --global diff.colorMoved plain
 9# push branch to same-named remote
10git config --global push.default simple
11# attempt to autocorrect misspelled git commands in the cli
12git config --global help.autocorrect prompt 
13# add the diff to the commit message draft
14git config --global commit.verbose true
15# 3-way-diffing
16git config --global merge.conflictstyle zdiff3 
/ 2025-02-25 / (via) / #git