对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? []
接下来我将继续使用,这篇笔记再慢慢补充。
修复一个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