China Naming Network - Ziwei Dou Shu - Git modifies the branch name
Git modifies the branch name
Chicken soup today: When you are constantly worried, go out and see different scenery and meet different people and things.
Method 1: Use the git command to operate.
1. Modify the local branch name.
git branch-m oldbranch name new branch name
2. Delete the remote branch of the local branch.
git push origin :oldBranchName
3. Push the renamed local branch to a remote location and associate the local branch with it.
Git push-set- upstream origin newBranchName
Method 2: operate directly in IDEA
1. Modify the local branch name.
2. Delete the remote branch of the local branch.
3. Push the renamed local branch to a remote location and associate the local branch with it.