参考:https://danielkummer.github.io/git-flow-cheatsheet/index.zh_CN.html
1、 git flow 原理:图灵社区 : 阅读 : 基于git的源代码管理模型——git flow(这篇文章讲的很详细)
2、 git flow 安装:
- OSX
- Homebrew:
$ brew install git-flow
- Macports:
$ port install git-flow
- Homebrew:
- 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
Windows安装 git-flow, 需要 wget 和 util-linux。
3、 git flow 常用命令:
git flow init # 初始化一个现有的 git 库 git flow feature start myFeature # 创建一个基于'develop'的特性分支,并切换到这个分支之下 git flow feature finish myFeature # 完成开发新特性。这个动作执行下面的操作:合并 myFeature 分支到 'develop';删除这个新特性分支;切换回 'develop' 分支 git flow feature publish myFeature # 发布新特性分支到远程服务器 git flow feature pull myFeature # 拉取远程myFeature分支 git flow release start myRelease # 它从 'develop' 分支开始创建一个 release 分支 git flow release finish myRelease # 完成 release 分支,它执行下面几个动作:归并 release 分支到 'master' 分支;用 release 分支名打 Tag;归并 release 分支到 'develop';移除 release 分支. git flow hotfix start myHotfix #hotfix <= master="" git="" flow="" hotfix="" finish="" myhotfix="" #hotfix=""> master hotfix => develop TAG =>
4、gitflow简单使用:
http://www.tuicool.com/articles/n6Zf2u
5、git-flow备忘清单:
https://danielkummer.github.io/git-flow-cheatsheet/index.zh_CN.html