使用 git-flow 从中央存储库中提取已发布发布分支的首选工作流程是什么?
例如:
Mike创建了一个发布分支,他通过“git flowreleasepublish1.0”发布了它
Jane 也想在该发布分支上工作,她如何从中央存储库中提取它以继续在该特定分支上使用 git flow?
- 通过 git flow release start 1.0 然后通过 git pull 在本地创建分支?
- 使用 git checkout -b release/1.0 origin/release/1.0 通过 git 在本地创建一个跟踪分支,并从那里继续(git flow 是否以这种方式在分支上工作?)
What is the perferred workflow to pull a published release branch from the central repo using git-flow?
eg:
Mike made a release branch, he published it through "git flow release publish 1.0"
Jane would like to work on that release branch too, how does she pull it from the central repo to continue working with git flow on that particular branch?
- create the branch herself locally through
git flow release start 1.0
and then git pull
?
- create a tracking branch locally through git with
git checkout -b release/1.0 origin/release/1.0
and continue from there (does git flow work on the branch this way?)
发布评论
评论(3)
所需要做的就是设置一个本地跟踪分支,不需要 git-flow 特定命令。 Git-flow 显然只关心分支的名称以及它是否以“release/”字符串为前缀。
因此,设置一个本地跟踪分支(例如 gitbranch --trackrelease/1.5origin/release/1.5)就足够了。
All that is needed is setting up a local tracking branch, no git-flow specific commands are needed. Git-flow apparently only cares about the name of the branch and if it is prefixed with the "release/" string.
So setting up a local tracking branch like
git branch --track release/1.5 origin/release/1.5
is all there is to it.git flow 版本(和功能)有一个“track”命令来简化您想要做的事情。要为已发布的分支设置本地跟踪分支并切换到该分支,只需执行以下操作:
或者
以下是来自 发布“track”命令的 gitflow 源:
有用的 git flow 命令行参数
git flow release (and feature) have a "track" command to simplify what you're trying to do. To set up a local tracking branch for a branch that has already been published, and switch to it, just do this:
or
Here's the code excerpt from the gitflow source for the release "track" command:
Helpful git flow command line arguments
一旦 git flowreleasepublish 完成,您可以执行以下操作:
然后您可以开始拉取:
Once
git flow release publish
is done, you can do the following:And then you can start pulling: