DEV Community

Johan G
Johan G

Posted on

Change Git default branch name

Prior to Git 2.28, the default branch name when git init is used is master.

To change the default branch name use the command

git config --global init.defaultBranch [new default name]

More details, can be found here.

Discussion (0)