Rename branch

To rename branch, you can use -m option of git branch.

Rename <oldbranch> to <newbranch>

$ git branch -m <oldbranch> <newbranch>

Rename current branch to <newbranch>

$ git branch -m <newbranch>

If <newbranch> exists, -M instead of -m must be used to force the rename to happen.