Why would you want to introduce a branch?
What is the use of branching in practice? Suppose you are ready to develop a new feature, but it takes two weeks to complete, the first week you write 50% of the code, if submitted immediately, because the code is not finished, the incomplete code base will cause others can not work. There is a huge risk of losing your daily progress if you wait until the code is all written and then submitted again.
Now that you have a branch, don't be afraid. You create a branch of your own, others do not see, but also continue to work on the original branch, and you work on your own branch, you want to submit the submission, until the development is complete, then once merged into the original branch, so that it is safe, and does not affect the work of others.
To view branches:git branch
To create a branch:git branch <name>
To switch branches:git checkout <name>
Create + switch Branches:git checkout -b <name>
Merge a branch to the current branch:git merge <name>
To delete a branch:git branch -d <name>
Thank Prof. Liao:
Http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/ 0013743862006503a1c5bf5a783434581661a3cc2084efa000
Git learning note Five--branch management