change branche name git code example
Example 1: change local branch name
git branch -m <newname>
Example 2: how to change branch name in github
$ git branch -m OLD-BRANCH-NAME NEW-BRANCH-NAME
$ git fetch origin
$ git branch -u origin/NEW-BRANCH-NAME NEW-BRANCH-NAME