DEV Community

Johan G
Johan G

Posted on

3

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.

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more