Ray +

Git Flow

Git想必大家都很熟悉是什么个东西,就不在废话。今天说的是Git Flow

git-flow 是一个 git 扩展集,按 Vincent Driessen 的分支模型提供高层次的库操作。
image
查看详情

安装

**OSX** brew install git-flow
**Linux** apt-get install git-flow
**Windown** wget -q -O - --no-check-certificate https://github.com/nvie/gitflow/raw/develop/contrib/gitflow-installer.sh | bash

初始化

在git的项目顶目录执行

git flow init

会有一部分确认命令,大致是

No branches exist yet. Base branches must be created now.
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? []

设定完成之后预设的分支就会变为develop分支

开发新功能,建立新的特性feature分支

执行

git flow feature start NEWFEATURE
(以此类推 git flow release 和 git flow hotfix)

这会帮你创建一个新的分支,分支是从develop分支。

git flow feature publish NEWFEATURE (此命令会将本地分支推送到服务器)
git flow feature finish NEWFEATURE (此命令会将分支merge到develop,并且删除当前分支)

如需要track别人的分支使用

git flow feature track NEWFEATURE

问题记录

点击查看评论

Code

Life

Project