Skip to content

Latest commit

 

History

History
13 lines (11 loc) · 337 Bytes

rename_branch.md

File metadata and controls

13 lines (11 loc) · 337 Bytes

Rename branch locally

Locally:

git branch -m old-branch-name new-branch-name

Remotely:

git push origin :old-branch-name
git push origin new-branch-name

The first command removes the old branch with old-branch-name and the 2nd command pushes the new branch with new-branch-name to our remote Git server.