Last active
February 6, 2021 08:40
-
-
Save junhan-z/0357b7322e8f6357b4ad73cf2fdc7e90 to your computer and use it in GitHub Desktop.
Change "master" branch to "main"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rename local master branch to "main" | |
git branch -m master main | |
# push to remote branch as "main" | |
git push origin main:main | |
# go to github, change the default branch, which usually to be "master" | |
# delete remote "master" branch | |
git push origin --delete master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment