Rename git branch

First checkout to the branch which you want to rename:

To remove an old branch fromĀ remote: