2021-02-20 git

Changing Git’s default branch name of new repositories

With Git’s default configuration every time you create a new repository the initial branch will be set to master , this has been the unchangeable rule ever since.

changing default branch's name

Changing to another name

To update this configuration globally, you will need to type the following instructions into your terminal:

git config --global init.defaultBranch new_default_branch_name

changing default branch's name

That’s all you need. Happy coding!