If you want to rename a branch while you are at this branch:
git branch -m new_branch_name
If you want to rename a branch while you are not at this branch:
git branch -m old_branch_name new_branch_name
If you make a commit, have not pushed yet:
git commit --amend