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
:爲了一個新功能、新想法,你可以臨時隨心所欲的開新分支。