git - rename branch (local and remote)

Rename local branch:

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

Rename remote branch:

#delete remote branch with old name
git push origin :old-branch-name

# create remote renamed branch
git push origin new-branch-name

stackoverflow

profile for Boris Serebrov on Stack Exchange, a network of free, community-driven Q&A sites