Created
February 14, 2014 01:30
-
-
Save schnell18/8994224 to your computer and use it in GitHub Desktop.
Replace master branch with different name. If you want to set up master branch with a different name, try these commands.
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 checkout master | |
git checkout -b <NEW_NAME_FOR_MASTER> | |
git symbolic-ref HEAD refs/heads/<NEW_NAME_FOR_MASTER> | |
git branch -D master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The key is to run the git symbolic-ref command which set the new branch active, and any new clone of this repository use the new branch as master automatically.