How I configure git
Git [1] 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.
Identity # [2]
git config --global user.name "John Doe"
git config --global user.email [email protected]
rebase # [3]
editor # [4]
git config --global core.editor nvim
default branch # [5]
git config --global init.defaultBranch main
push to current bransh wihtout setting upstream # [6]
git config --global push.default current
Autostash # [7]
git config pull.rebase true
git config rebase.autoStash true
References:
[1]: /glossary/git/
[2]: #identity
[3]: #rebase
[4]: #editor
[5]: #default-branch
[6]: #push-to-current-bransh-wihtout-setting-upstream
[7]: #autostash