Git allows you to rename a branch using the git branch -m command.
This command works for both local and remote branches.
To rename a local branch, use the command git branch -m <oldname> <newname>.
To rename a remote branch, use the command git push origin :<oldname> <newname>.
After renaming the branch, you need to delete the old branch from the remote repository.
See more results on Neeva
Summaries from the best pages on the web
You created a new branch , pushed the changes to the remote repository, and realized that your branch name was incorrect.
Luckily, Git allows you to rename the branch very easily using the git branch -m command.
How To Rename a Local and Remote Git Branch | Linuxize
You can change the name of a branch in a repository. ... provides instructions on the repository's home page directing contributors to update their local Git ...
Renaming a branch - GitHub Docs
Did you make a mistake in naming your Git branch? Or maybe "branch-2" wasn't descriptive enough? Luckily in Git you can rename a local branch pretty ...
Git: Rename a Local and Remote Branch