1 基礎命令:
- 初始化: git flow init
- 開始新Feature: git flow feature start MYFEATURE
- Publish一個Feature(也就是push到遠程): git flow feature publish MYFEATURE
- 獲取Publish的Feature: git flow feature pull origin MYFEATURE
- 完成一個Feature: git flow feature finish MYFEATURE
- 開始一個Release: git flow release start RELEASE [BASE]
- Publish一個Release: git flow release publish RELEASE
- 發布Release: git flow release finish RELEASE
別忘了git push --tags - 開始一個Hotfix: git flow hotfix start VERSION [BASENAME]
- 發布一個Hotfix git flow hotfix finish VERSION
2 Git Flow
2.1 用途
大型團隊項目中高效快速管理分支(初始化/新建/結束 分支)
2.2 圖示
2.3 七條指令
先看參考鏈接2,然后結合上圖,7條指令干了什么一目了然。
- git flow init
- git flow feature start xxx
- git flow feature finish xxx
- git flow release start 0.1.xx
- git flow release finish 0.1.xx
- git flow hotfix start xxx
- git flow hotfix finish xxx
3 UI界面
知道了基本命令的用途后,可以結合git相關的UI界面來快速上手,如git gui和gitk。
ubuntu可以用非商用免費版的SmartGit,同樣支持git-flow。