Git init default branch name

By default, git uses master as the default branch name. But this can be changed to main or any other name. Just configure git as follows:

git config --global init.defaultBranch main

You should be using git version >= 2.28.0 to use this feature. Check your git version using:

git --version

For WSL users, you can update git to the latest version using this guide.

Helpful?

If you think this is helpful 🎈
Don't keep it to yourself 🙊

Share it with your lovely followers at twitter 🗽

lets connect viatwitter