安装git flow
Windows
配合Cygwin使用。Cygwin之下的安装非常简单。执行如下指令即可:
wget -q -O - --no-check-certificate
https://github.com/nvie/gitflow/raw/develop/contrib/gitflow-installer.sh | bash
代码示例
---------------------------------------------------------
使用gitflow
1.初始化
打开git-bash,进入项目文件目录,输入
git flow init
2.开始一个新feature(feature1)
git flow feature start feature1
3.
Publish一个Feature(进行修改后,提交到远程,即push)
git flow feature publish feature1
4
.
获取Publish的Feature(切到develop分支,
将feature内容合并到develop)
git flow feature pull origin feature1
5.
完成一个Feature
git flow feature finish feature1
6.
开始一个Release
git flow release start "1.0.0"
7.
Publish一个Release
git flow release publish "1.0.0"
8. 发布Release
git flow release finish "1.0.0"
查看版本tag
git tags
1.0.0
更新到远程仓库
$ git push origin develop
$ git checkout master
$ git push origin master
push 标签信息
$ git push --tags
git flow hotfix start VERSION
10.
发布一个Hotfix
git flow hotfix finish VERSION
gitflow模型介绍