Summary
Git allows you to rename a branch using the git branch -m command.
1
This command works for both local and remote branches.
1
To rename a local branch, use the command git branch -m <oldname> <newname>.
1
To rename a remote branch, use the command git push origin :<oldname> <newname>.
1
After renaming the branch, you need to delete the old branch from the remote repository.
1
According to