Change the name of a branch in your repository.
$ git branch -m <old_name> <new_name>
Check the list of your branches to make sure you successfully renamed the branch.
$ git branch
main
<new_name>
Change the name of a branch in your repository.
$ git branch -m <old_name> <new_name>
Check the list of your branches to make sure you successfully renamed the branch.
$ git branch
main
<new_name>