Skip to content

Change default branch name to main #63387

Answered by w8ste
peterl3g asked this question in New to GitHub
Discussion options

You must be logged in to vote

@peterl3g Hi, here is what you need to do:

Local

  • run in your terminal/cli-tool the following command:
git config --global init.defaultBranch main

GitHub

  • click on the profile icon in the top right corner
  • go to settings
  • under "Code, planning, and automation" you will "Repositories"
  • There you can set the "Repository default branch" to main

I hope this helps :)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by peterl3g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Repositories The core of version-controlled code storage New User Help ❓ New User help
2 participants