For Locally
at first change your current branch from the branch you want to update name for example I have 3 branch branch1 , branch2 , branch3
check current branch
git branch --show-current
output may : branch1
then you can update name of branch2 and branch3 not the current one
git branch -m old_branchname new_branchname
For remote
Just three steps to replicate change in name on remote as well as on GitHub:
git branch -m old_branchname new_branchname
git push origin :old_branchname new_branchname
git push --set-upstream origin new_branchname