Skip to content

Instantly share code, notes, and snippets.

@Haaroon
Last active August 2, 2023 21:32
Show Gist options
  • Save Haaroon/a81956fc1d40f3f9df5a4203f05f3494 to your computer and use it in GitHub Desktop.
Save Haaroon/a81956fc1d40f3f9df5a4203f05f3494 to your computer and use it in GitHub Desktop.
Rename branch from main to master
git branch -m main master
git push -u origin master
git remote set-head origin master
# Now go to github in a browser,
# open the repo, click settings, branch and change the default branch to master
git push origin --delete main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment