To make this happen you will need to follow below steps:
Rename your local branch:
If you are on the same branch that you want to rename then run below command:
git branch -m new-branch-name
In above command, i have renamed my current branch name to 'branch-new-name'. You will have to change it as per your requirement.
In case you are on A branch you want to rename B branch as C then run below command:
git branch -m B C
Now is the time to delete old branch name and push the new local branch:
git push origin :B C
To reset upstream branches so that they can update new branch name as well:
git push origin -u C
I hope this small trick will help you a lot. Please do let me know your feedback on the comment section below.