一、Windows
一、MSysGit
这是地址:http://msysgit.github.io/ ,如果没有安装的,可以看看教程,基本上很简单。
二、git flow
三、安装说明
Download and install getopt.exe from the util-linux package into C:\Program Files\Git\bin. (Only getopt.exe, the others util-linux files are not used). Also install libintl3.dll and libiconv2.dll from the Dependencies packages (libintl and libiconv), into the same directory.
说明:把链接里面的3个文件对应的二进制文件下载后,分别解压复制出对应的东西即可。
即复制getopt.exe、libint13.dll、libiconv2.dll到Git目录的bin下面
Clone the git-flow sources from GitHub:
$ git clone --recursive git://github.com/nvie/gitflow.git
说明:
我是在Git安装目录下,执行clone操作的,完成后会多出一个gitflow文件夹。
四、执行cmd (打开Windows的cmd窗口执行)
Run the msysgit-install script from a command-line prompt (you may have to run it with "Full Administrator" rights if you installed msysgit with its installer, and ensure you're running from a Windows command prompt, not MINGW):
C:\gitflow> contrib\msysgit-install.cmd
完成后,可以在git bash运行 git flow help查看
注:后来在新电脑执行的时候,提示失败,然后改成这样才成功
D:\Git\gitflow> contrib\msysgit-install.cmd "D:\Git"
五、初始化
执行 git flow init,基本都一直回车就行
例如:
No branches exist yet. Base branches must be created now.
Branch name for production releases: [master]
Branch name for "next release" development: [develop]
How to name your supporting branch prefixes?
Feature branches? [feature/]
Release branches? [release/]
Hotfix branches? [hotfix/]
Support branches? [support/]
Version tag prefix? []
六、其他介绍
主要分支
master: 永远处于 production-ready 状态
develop: 最新的下次发布的开发状态
支援性分支
Feature branches: 开发新功能都从 develop 分支出来,完成后 merge 回 develop
Release branches: 准备要 release 的版本,只修 bugs。从 develop 分支出来,完成后 merge 回 master 和 develop
Hotfix branches: 等不及 release 版本就必须马上修 master 上线的情況。会从 master 分支出来,完成后 merge 回 master 和 develop
参考资料:
二、Mac OS
参考