To rename a branch you simply need to create a new one starting from the branch you want to rename. And when you create this new branch you can simply delete the old branch.
An example: I want to rename the branch called "old" to "new". To do this with the command line you need to be in the "old" branch, so if you are not in this you need to switch to it:
git checkout old
Now you have to create a new branch and call it "new":
git checkout -b new
The "old" branch is useless than you can delete that:
git branch -D old
if you have "old" also in remote repository you have to delete it with:
git push origin --delete old
Where origin is the remote repository.
Hope to solve your problem 🙂