Switch branch names in git

In addition to the other comments, you may find the -m (move) switch to git-branch helpful. You could rename your old master to something else, then rename your new branch to master:

git branch -m master crap_work
git branch -m previous_master master

Leave a Comment