Git flow for windows

Git flow for windows

git-flow在ubuntu上使用比较简单。首先安装,可以通过apt-get来获取。命令如下:

sudo apt-get install git-flow

如果是在windows下,安装过程如下:(参考https://github.com/nvie/gitflow/wiki/Windows)

先安装好git,下载下面的三个文件放到git的安装目录的bin目录下,或者下载下面两个地址的文件,并解压出getopt.exe和libintl3.dll、libiconv2.dll放到git的安装目录的bin目录下,即: C:\Program Files (x86)\Git\bin,假设git的安装路径为 C:\Program Files (x86)\Git。

http://sourceforge.net/projects/gnuwin32/files/util-linux/2.14.1/util-linux-ng-2.14.1-bin.zip/download
http://sourceforge.net/projects/gnuwin32/files/util-linux/2.14.1/util-linux-ng-2.14.1-dep.zip/download
然后检出github上gitflow项目,如下命令:

git clone --recursive git://github.com/nvie/gitflow.git

进入并执行里面的contrib\msysgit-install.cmd,命令格式如下:

contrib\msysgit-install.cmd "C:\Program Files (x86)\Git" 
后一个参数即git的安装目录

提示复制成功,就可以了。

接下来是初始化项目。我在我原来的git项目上执行以下命令来进行初始化:

git flow init

它会创建或转换一个新的版本分支结构,当然在初始化的过程中,会问到以下这边问题,我都选择了默认:

Which branch should be used for bringing forth production releases?  
   - master  
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? [] 

完成之后,通过git branch 命令,可以看到它为我们新建好了一个develop的分支。

git flow的使用,详见

http://danielkummer.github.io/git-flow-cheatsheet/index.zh_CN.html
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值