Renaming Git Branches
It's simple. But it's easy to forget.
TL;DR version
Long version
If you have two branches, master
and old-branch
, and you’re on master
branch. If you wanna replace the name of the branch old-branch
with new-branch
, type this in your terminal:
If you’re on old-branch
branch already, enter this: