Rename Local Branch
When we need to rename a local branch, we can use the git branch -m
command. The command renames the current branch if no branch name is provided. If a branch name is provided, it renames the branch with the given name.
git branch -m <newname>
git branch -m <oldname> <newname>