How I configure git

edit ✏️

Git can be a bit tricky to get configured correctly. I often stumble into config issues weeks after setting up a new machine that I did not even notice. These are my notes to remind me how I configure git.


git config --global "John Doe"
git config --global [email protected]



git config --global core.editor nvim

default branch

git config --global init.defaultBranch main

push to current bransh wihtout setting upstream

git config --global push.default current


git config pull.rebase true
git config rebase.autoStash true