Answers for "git rename a local branch"

75

git rename branch

git branch -m <oldname> <newname> # Any Branch
git branch -m <newname> # Current Branch

# For windows if you get "Branch already exists" error
git branch -M <newname>
Posted by: Guest on March-05-2020
49

rename branch git

git branch -m <new_name>
Posted by: Guest on March-01-2020
14

git rename local branch

git branch -m <oldname> <newname>
Posted by: Guest on August-10-2020
0

git rename a local branch

git branch -m <new-branch-name>
Posted by: Guest on April-24-2021

Browse Popular Code Answers by Language