Skip to content

Instantly share code, notes, and snippets.

@qwlong
Last active April 13, 2018 04:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qwlong/bfa706f01c9994a0d66dc176a6e790d5 to your computer and use it in GitHub Desktop.
Save qwlong/bfa706f01c9994a0d66dc176a6e790d5 to your computer and use it in GitHub Desktop.
Git Flow 版本发布流程
1、Git Flow是什么: 版本发布流程
https://files.slack.com/files-pri/T84A6PJGN-FA61ZJ267/image.png
2、Git Flow 参考文档
git flow 英文版本
http://danielkummer.github.io/git-flow-cheatsheet/index.html
git flow 中文版本
http://danielkummer.github.io/git-flow-cheatsheet/index.zh_CN.html
3、Git Flow分支
主要分支
master: 永远处在 production-ready 状态
develop: 最新的下次发布开发状态
支援性分支
Feature branches: 开发新功能都从 develop 分支出来,完成后 merge 回 develop
Release branches: 准备要 release 的版本,只修 bugs。从 develop 分支出来,完成后 merge 回 master 和 develop
Hotfix branches: 紧急修复的版本。会从 master 分支出来,完成后 merge 回 master 和 develop
4、使用流程
git flow init
feature:
git flow feature start mobile_register
git flow feature publish mobile_register
git flow feature finish mobile_register
release:
git flow feature start v1
git flow feature publish v1
git flow feature finish v1
git checkout master
git push
git push --tags 提交代码并打标签
git checkout develop
git push
hotfix:
git flow hotfix start fix_home_style
git push origin hotfix/fix_home_style
git flow hotfix finish fix_home_style
git checkout master
git push
git push --tags
git checkout develop
git push
5、安装
Mac
Homebrew
$ brew install git-flow
Macports
$ port install git-flow
Linux
$ apt-get install git-flow
Windows (Cygwin)
$ wget -q -O - --no-check-certificate https://github.com/nvie/gitflow/raw/develop/contrib/gitflow-installer.sh | bash
You need wget and util-linux to install git-flow.
SourceTree
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment