Logo Mark L. Reyes
Rename a local and remote branch

Rename a local and remote branch

March 17, 2017
1 min read

# Rename your local branch. If you are on the branch to rename: git branch -m branch-new-name

# Delete the old-name remote branch and push the new-name local branch. git push origin :branch-old-name branch-new-name ``# Reset the upstream branch for the new-name local branch. git push origin -u branch-new-name

Thanks to, multiplestates.wordpress.com.