git branch — git branch management

 

One of the management methods that git mainly advocates is branch management, so this should be mastered by everyone who learns git.

Branch view:
git branch

Branch establishment:
git branch newBranch  commit  or:
git checkout -b newBranch  commit

Branch switching:

git checkout anotherBranch

Delete branch:

git branch -D existBranch (delete the branch regardless of whether it is merged or not)
git branch -d existBranch (delete the merged branch)

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327043087&siteId=291194637