一、创建并克隆 repo
https://github.com/FrankKai/git-flow-demo.git
二、安装 webstorm git flow 插件
插件名:Git Flow Integration

1.插件安装失败?https://www.jetbrains.com/ 搜索栏 关键字 搜索。
2.找到目标插件并下载:http://plugins.jetbrains.com/plugin/7315-git-flow-integration
3.本地安装并重启webstorm
三、git flow初始化 repo
1.右下角init repo

2.初始化配置

3.git flow actions
Feature

-
Start Feature
-
Finish Feature
-
Publish Feature
有一个发现:
- Publish之后,会在remote仓库生成一个新的分支
有几个问题:
- Publish之后,Finish失败。
- 单独删除/remotes/origin/feature/foo失败。
老哥建议:
- Publish不常用
- 可以使用删除远程仓库分支的git命令`git push origin --delete feature/bar`(非默认分支)
-
Track Feature
类似于pull一个远程分支。
Release
-
Start Release
-
Finish Release
-
Publish Release
-
Track Release
类似于pull一个远程分支。
发现:
- 只有在一个release Finish之后才能Start新的分支。
Hotfix
-
Start Hotfix

-
Finish Hotfix

-
Publish Hotfix
四、总结
- Start *
基于master/develop创建出新的分支- Feature
develop->feature/*
- Release
develop->release/*
- Hotfix
master->hotfix/*
- Feature
- Finish *
合并当前特殊分支到master/develop,删除当前特殊分支- Feature
feature/* -> develop
- Release
release/* -> develop && master
- Hotfix
hotfix/* ->develop && master
- Feature
- Publish *
创建同名remote分支- Feature
feature/*
- Release
release/*
- Hotfix
hotfix/*
- Feature
That's it !
网友评论