Disclaimer: I am a consultant at Amazon Web Services, and this is my personal blog. The opinions expressed here are solely mine and do not reflect the views of Amazon Web Services (AWS). Any statements made should not be considered official endorsements or statements by AWS.
If you want to rename the branch you are currently working on, hit below command:
git branch -m <newBranchName>
If the branch you want to rename is different from your current branch, then hit below command
git branch -m <oldBranchName> <newBranchName>
To check your current branch, hit below command. You can see the current branch highlighted followed by an asterisk.
git branch
The same question has also been asked here as well @ StackOverflow.