How to: Rename a Git branch

Did you make a typo when creating a Git branch. Fixing it is really simple:

git branch -m <oldname> <newname>

Or, if you are already in the branch:

git branch -m <newname>

And boom! You're done.