TL;DR;

# Checkout the branch you wanna rename
git checkout <old_branch_name>
# Rename the branch
git branch -m <new_branch_name>

(Optional) Create a git alias

Either by running

git config --global alias.rename "branch -m --"

or by editing your ~/.gitconfig

[alias]
  rename = branch -m --

Then you can just use:

git rename <new_branch_name>