If you are currently on the branch which you need to rename it using:
git branch -m new_name
Or else:
git branch -m old_name new_name
To check the name changed or not you could use
git branch -a
This will show you the branch with a new name it means you have successfully changed the branch name in the local repo if you want to do that in remote repo then you could use:
git push origin: old_name
This will remove the old branch name
git push origin new_name
This will update the changes in the repo and uploads the file with the changed name or new name.