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分支上。