git-flow release finish被拒绝,因为开发已经领先

时间:2015-06-16 18:30:39

标签: git github

我正在使用git-flow来管理我们的发布流程。在执行git-flow init等之后,我用

创建了一个候选发布版本
git-flow release start <label> 

一切都很好。在我测试RC分支时,其他开发人员通常正在开发分支中的下一个版本。当RC分支被宣布为好时,我使用

git-flow release finish –p <label>  

然后我有时(并非总是)得到错误

 ! [rejected]        develop -> develop (non-fast-forward)
error: failed to push some refs to <repo-address>
hint: Updates were rejected because a pushed branch tip is behind its remote
hint: counterpart. Check out this branch and integrate the remote changes
hint: (e.g. 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Could not push to develop from origin.

当然,由于开发人员正致力于开发,因此它将落后于技巧。我应该告诉git-flow不要合并回开发吗?如果是这样,怎么样?如果没有,那么正确的工作流程是什么?

1 个答案:

答案 0 :(得分:1)

您肯定想要合并回develop,但在此之前,您需要从开发中获取。根据您的描述,看起来git-flow不会自动执行此操作,但它会自动推送 develop,这很奇怪。无论如何,我会将以下内容作为您的工作流程:

git checkout develop
git pull
git checkout <release-branch>
git-flow release finish –p <label>  
相关问题