GitFlow使用说明
———————安装---------------
$ git clone --recursive git://github.com/nvie/gitflow.git
$ cd gitflow
$ [sudo] make install
---------------初始化---------------
创建本地Master分支:git checkout -b master origin/master
git flow init
Feature branches? [feature/]
Release branches? [release/]
Hotfix branches? [hotfix/]
Support branches? [support/] bugfix
Version tag prefix? []
---------------基本配置---------------
git config --global color.ui true
---------------新功能开发---------------
开始
git flow feature start <NEWFEATURE>
结束
git flow feature finish <NEWFEATURE>
---------------线上BUG修改--------------
开始
git flow hotfix start <hotfix20140220>
发布分支到Git Server以便协同处理
git flow hotfix publish <hotfix20140220>
Checkout到本地分支
git checkout –track origin/hotfix/<hotfix20140220>
结束
git flow hotfix finish <hotfix20140220>
删除线上分支
git push origin :hotfix/hotfix140221
--------------------------------------------------------------------------------------------------------
其他命令
查看远程Git Server 库版本
git branch –r
切换分支
git checkout NEWBRANCH
获取远程tag
$ git fetch origin tag <tagname]]>
本地tab点推送到远程
$ git push --tags
git 回滚:
git reset --hard 版本号
强行回滚远程服务器:
git push -f
#删除远程的master分支 >git push origin :master
posted on 2015-02-06 21:38 Gary Zhang 阅读(518) 评论(0) 编辑 收藏 举报