-2

Whenever I create a new git init, it automatically names the default branch to master rather than naming it to main.

1 Answers1

-1

See https://git-scm.com/docs/git-config#Documentation/git-config.txt-initdefaultBranch

git config --global init.defaultBranch main
acran
  • 7,070
  • 1
  • 18
  • 35