git flow 常用命令
阿新 • • 發佈:2018-11-09
1.在已經存在的git倉庫中新增git flow
git flow init
2.develop分支只有一個,新功能的開發是基於develop建立的feature分支上開發的。
git flow feature start 功能name ---執行之後feature/name 分支就會被建立
新的功能開發完畢之後
git flow feature finish 功能name ---執行之後 該功能分支的內容就會合併到develop分支上,並刪除feature/name分支
3.release分支:為了釋出而存在的分支,也是基於develop分支建立的-同一時間只能有一個
git flow release start v.1.0 --建立一個release分支
git flow release finish v.1.0 -- 執行之後1.會合併到master develop 分支上,2.使用release分支名打tag. 3.刪除release分支
4.hotfix分支 -同一時間只能有一個 --基於master分支建立
git flow hotfix start v.1.0 --建立hotfix分支
git flow hotfix finish v.1.0 --結束hotfix分支 並 刪除此分支 併合併到develop master分支上。