git -- create and merge branches

Git encourages heavy use of branches:

 

Check out the branch:git branch

 

Create a branch:git branch <name>

 

Switch branches:git checkout <name>

 

Create + switch branches:git checkout -b <name>

 

Merge a branch into the current branch:git merge <name>

 

Delete branch:git branch -d <name>

Ignore conflicting merges: git merge feature1 Auto-merging readme.txt

Check the branch merge status: git log --graph --pretty=oneline --abbrev-commit

Guess you like

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