使用git-flow来帮助管理git代码
时间:2014-04-03 13:23:52
收藏:0
阅读:472
对git不熟悉的我,经常把git提交搞得很乱,导致在master上有许多无用的commit,最终决定好好地看一下git的使用教程,却不小心发现了还有一个git-flow的工具可以帮助我管理好git项目的代码。
git-flow在ubuntu上使用比较简单。首先安装,可以通过apt-get来获取。命令如下:
sudo apt-get install git-flow
接下来是初始化项目。我在我原来的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它会创建一个基于master的分支hotfix/3,并切换到当前分支。
当修复完成后,可以执行以下命令:
git flow notfix finish 3
使用git-flow来帮助管理git代码,布布扣,bubuko.com
原文:http://blog.csdn.net/maosidiaoxian/article/details/22799157
评论(0)