Published : 2015-07-21

Change the default branch

By default git uses the master branch as the main upstream branch. To change the branch, first create a new branch if you don’t have one yet:

git checkout -b newmasterbranch

Then use symbolic-ref to bind HEAD to your new branch:

git symbolic-ref HEAD refs/head_s/_newmasterbranch