使用git-flow来帮助管理git代码
来源:互联网 发布:暗影格斗2mac破解 编辑:程序博客网 时间:2024/06/09 16:57
come from :http://blog.csdn.net/maosidiaoxian/article/details/22799157
对git不熟悉的我,经常把git提交搞得很乱,导致在master上有许多无用的commit,最终决定好好地看一下git的使用教程,却不小心发现了还有一个git-flow的工具可以帮助我管理好git项目的代码。
git-flow在ubuntu上使用比较简单。首先安装,可以通过apt-get来获取。命令如下:
sudo apt-get install git-flow
如果是在windows下,可以参考这篇文章进行安装:http://my.eoe.cn/sunxun/archive/158.html
如果你的git已经装好,则方便多了,下载下面两个地址的文件,并解压出getopt.exe和libintl3.dll放到git的安装目录的bin目录下。
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
接下来是初始化项目。我在我原来的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的分支。
接下来我将继续使用,这篇笔记再慢慢补充。
修复一个bug。
- git flow hotfix start 3
当修复完成后,可以执行以下命令:
- git flow notfix finish 3
增加一个功能特性
- git flow feature start demo
它会创建一个分支feature/demo,并切换到该分支。
- git flow feature finish demo
功能完成,要合并到主分支,这时可以执行
- git flow release start v0.7.0
然后在这里进行测试。如果测试没问题,则执行以下命令:
- git flow release finish v0.7.0
- 使用git-flow来帮助管理git代码
- 使用git-flow来帮助管理git代码
- 使用Git和Github来管理代码
- 使用Git Flow管理开发流程
- 使用Git管理代码
- 使用Git管理代码
- 使用Git管理代码
- 使用Git管理代码
- 使用Git管理代码
- git flow 的使用
- git flow 的使用
- git flow的使用
- git flow使用总结
- Git-flow的使用
- Git Flow 使用简介
- git flow使用
- git flow 使用
- Git flow的使用
- ios 广告图片无限滚动(swift)
- Python学习笔记(4)Python中super的用法
- UVA 11995I Can Guess the Data Structure!【模拟】
- 黑马程序员——Java程序的初始化过程详解
- 素数的判定
- 使用git-flow来帮助管理git代码
- hdu1874 畅通工程续 最短路 floyd或dijkstra或spfa
- C. Arthur and Table(Codeforces Round #311 (Div. 2) 贪心)
- ViewPager禁用左右滑动
- leetcode 132: Palindrome Partitioning II
- object hbase is not a member of package org.apache.hadoop
- Java中enum的学习总结
- Amazon Kinesis简介
- Facade——结构模式