OK, renaming a branch both locally and on the remote is pretty easy!...
If you on the branch, you can easily do:
git branch -m <branch>
or if not, you need to do:
git branch -m <your_old_branch> <your_new_branch>
Then, push deletion to the remote like this:
git push origin <your_old_branch>
Now you done, if you get upstream error while you trying to push, simply do:
git push --set-upstream origin <your_new_branch>
I also create the image below to show the steps in real command line, just follow the steps and you would be good: