How to rename your git branch
C Turner

C Turner @catturner

Joined:
Nov 8, 2018

How to rename your git branch

Publish Date: Jun 14 '20
2 1

Thinking about renaming your default branch for your repo? You can do it 3 easy steps.
git branch -m stem
git push origin :master
git push --set-upstream origin stem

You might encounter an error that looks like this! Not to worry, this means that your default branch is set to master, and you need to change your repo settings.
Alt Text

Go to your repo, and switch to another branch as your default. Do your thang. Then update your default branch settings to the new branch you have made!
Alt Text

That's it! What did you rename your branch to? Drop a comment below. Like a comment if you renamed your branch to the same thing!

Comments 1 total

Add comment