All of the previous answers are talking about git branch -m. Of course, it's easy to operate, but for me, it may be a little hard to remember another Git command. So I tried to get the work downdone by the command I was familiar with. Yeah, you may guessed it.
I use git branch -b <new_branch_name>. And if you don't want to save the old branch now you can execute git branch -D <old_branch_name> to remove it.
I know it may be a little tedious, but it's easier to understand and remember. I hope it‘s helpful for you.