Git分支管理和常見的分支工作流

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

利用分支的兩種典型工作流:

  1. master分支用來管理穩定發佈版本的代碼;

    另外搞個平行分支 develop用於管理測試版本、不穩定代碼

    測試通過,將develop分支合併進master分支

  2. topic branch:爲了一個新功能、新想法,你可以臨時隨心所欲的開新分支。

更多討論:https://github.com/pluscai/use-git/issues/20

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章