How to change branch name
git branch name ๋ณ๊ฒฝํ๊ธฐ
์ฒซ๋ฒ ์งธ ๋ฐฉ๋ฒ
git checkout branch-name
git branch -m new-branch-name
Then, you can use git status to see your new branch name.
๋๋ฒ ์งธ ๋ฐฉ๋ฒ
Step 1: Make sure you are in the master/main branch
If you are not in the master/main branch, then you will need to run git checkout master or git checkout main.
Step 2: Use the -m flag to rename the branch
git branch -m old-branch new-branch
This is what it would look like to rename the test-branch to test-branch2.
To see your new branch name, you can run git branch which will list all of your branches.
Last updated