1. Branch Management
-
查看分支
git branch
-
查看分支并显示每个分支最后一次提交
$ git branch -v iss53 93b412c Fix javascript issue * master 7a98805 Merge branch 'iss53' testing 782fd34 Add scott to the author list in the readme
-
查看已合并、未合并的分支
git branch --merged
git branch --no-merged
2. Branching Workflows
利用分支的两种典型工作流:
-
master
分支用来管理稳定发布版本的代码;另外搞个平行分支
develop
用于管理测试版本、不稳定代码测试通过,将
develop
分支合并进master
分支 -
topic branch
:为了一个新功能、新想法,你可以临时随心所欲的开新分支。