The answers so far have been correct, but here is some additional information:
One can safely rename a branch with '-m' (move), but one has to be careful, because with '-M', because it forces the rename, even if there is an existing branch with the same name already. Here is the excerpt from the 'git-branch' man page:
With a -m or -M option,
<oldbranch>will be renamed to<newbranch>. If<oldbranch>had a corresponding reflog, it is renamed to match<newbranch>, and a reflog entry is created to remember the branch renaming. If<newbranch>exists, -M must be used to force the rename to happen.
With a -m or -M option, <oldbranch> will be renamed to <newbranch>. If <oldbranch> had a corresponding reflog, it is renamed to match <newbranch>, and a reflog entry is created to remember the branch renaming. If <newbranch> exists, -M must be used to force the rename to happen.