Last active
November 24, 2020 06:42
-
-
Save danpozmanter/a3a7622e5c1531bb18f0a4a6dad627f7 to your computer and use it in GitHub Desktop.
Rename your master branch to main
This file contains hidden or 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
git branch -m master main | |
git push origin main | |
echo "In Github: Navigate to your repository settings/branches." | |
echo "If your branch has been added you'll be able to switch your default from master to main." | |
echo "------------------------------------" | |
echo "In Gitlab: Navigate to your project settings/branches." | |
echo "Then change your default to main." | |
echo "If your master is protected remove it and replace with main." | |
echo "------------------------------------" | |
echo "Make any changes relevant to deployment!" | |
echo "Hit <ENTER> when done." | |
read _ | |
git push origin :master | |
git branch --set-upstream-to=origin/main main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment