不要释放已经合并到dev分支中的所有功能 [英] Do not release all feature already merged into dev branch

查看:134
本文介绍了不要释放已经合并到dev分支中的所有功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有2个功能AB已经合并到dev分支中,分支dev用于测试环境,并且这2个功能都已测试.现在我们只想发布功能A,该怎么做?是不是我们的git flow很差?

We have 2 features A and B already merged into dev branch, branch dev using for test environment and both 2 features are tested. Now we just want to release only feature A, how to do it ? Did our git flow is wroong ?

推荐答案

到目前为止,您的git-flow看起来还不错.根本不打算使用它来部分释放develop.

Your git-flow looks fine so far. It is simply not meant to be used to release develop partially.

任何合并到develop的内容都将被释放.

Whatever gets merged onto develop is meant to be released.

以下是您可以使用的一些解决方案:

Here are some solutions you could use:

(1)除非要发布功能,否则不要合并(或者最好不要开始使用它).

(1) Do not merge (or better don't even start working on it) a feature until you want to release it.

(2)如果要合并未完成的功能,请添加功能开关,以轻松打开和关闭develop上的所有功能.
注意:并非所有人都认为这是好的软件设计-包括我在内.但是为了完整起见,我想提一下.

(2) If you want to merge unfinished features add a feature toggle to easily turn on and off whatever is on develop.
Heads-up: not everyone thinks this is good software design - me included. But for the sake of completeness I wanted to mention it.

(3)也不是一个好的方法,但是在技术上是可行的:恢复您不想在release分支上发布的功能.如果您不想重写提交历史记录(您不应该这样做),那么这现在可能是您唯一的选择.

(3) Also not a good approach but technically possible: Revert the features you don't want to release on your release branch. This might be your only option now if you don't want to re-write the commit history (which you should not).

(4)创建一个新的release分支,该分支从将功能Bcherry-pick功能A合并到该release分支之前的提交开始.

(4) Create a new release branch starting at the commit just before feature B was merged in and cherry-pick feature A into that release branch.

这篇关于不要释放已经合并到dev分支中的所有功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆