Created
September 21, 2014 23:40
-
-
Save j8/b365ef1507aae5653be7 to your computer and use it in GitHub Desktop.
Delete master branch and re-create it from existing branch
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
git branch -m master master-old # rename master on local | |
git push origin :master # delete master on remote | |
git push origin master-old # create master-old on remote | |
git checkout -b master OTHERBRANCH # create a new local master on top of OTHERBRANCH | |
git push origin master # create master on remote |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment