合并功能分支以发布分支而不是主干

发布于 2024-08-23 13:13:19 字数 893 浏览 8 评论 0原文

我有一个关于两个源代码控制场景的问题,这两个场景都具有功能分支和发布分支:

  • 在场景 1 中,功能分支被合并到主干。
  • 在场景 2 中,功能分支被合并到最新的发布分支。

与情景 1 相比,情景 2 的后果是什么?

这两种情况可能有哪些优点和缺点?


两种场景的更多细节:

  • 所有开发都在功能分支中完成,
  • 分支始终从主干

场景 1 完成(类似于 这个SO-answer):

  • 功能分支始终合并到主干
  • 新的发布分支是从主干创建的,当准备开始新版本时,
  • 在质​​量保证和从发布分支部署之后,发布分支中的更改/错误修复将合并到主干和更新的版本分支
  • 对主干的更改将合并到所有功能分支

场景 2:

  • 功能分支始终合并到最新发布分支
  • 从创建新的发布分支trunk,当当前发布分支不再接受新功能并开始为最终发布做准备时,
  • 在从发布分支进行 QA 和部署后,发布分支中的更改/错误修复将合并到主干< /strong>
  • 对主干的更改将合并到所有功能分支和最新发布分支

I have a question about two source control scenarios, both with feature branches and release branches:

  • In scenario 1 feature branches are merged to the trunk.
  • In scenario 2 feature branches are merged to the latest release branch.

What are the consequences of scenario 2 compared to scenario 1?

What are the possible advantages and disadvantages of both scenarios?


More details of the two scenarios:

  • all development is done in feature branches
  • branching is always done from the trunk

Scenario 1 (similar to what is described in this SO-answer):

  • feature branches are always merged to the trunk
  • a new release branch is created from the trunk, when preparations start for a new release
  • after QA and deployment from a release branch, the changes/bugfixes in the release branch are merged to trunk and newer release branches
  • changes to the trunk are merged to all feature branches

Scenario 2:

  • feature branches are always merged to the newest release branch
  • a new release branch is created from the trunk, when the current release branch no longer accepts new features and preparations start for final release
  • after QA and deployment from a release branch, the changes/bugfixes in the release branch are merged to trunk
  • changes to the trunk are merged to all feature branches and the newest release branch

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

埋情葬爱 2024-08-30 13:13:19

由于分支都是关于隔离(请参阅“何时应该分支),这两种场景之间的区别在于您希望主干主干具有的角色

  • 场景2更适合 >静态角色主干将代表生产中的内容(偶尔的修补程序需要合并回当前功能和下一个版本分支)

  • 场景 1 更适合动态角色主干是各种功能的集成,从那里创建发布分支以整合功能这实际上将成为下一个版本的一部分。

Since branching is all about isolation (see "When should you branch), the difference between the 2 scenarios is the role you want the main branch trunk to have:

  • Scenario 2 is more adapted to a static role: trunk would be the representation of what is in production (and the occasional hot-fixes needed to be merge back to current feature and next-release branch)

  • Scenario 1 is more suited for a dynamic role: trunk is the integration for various feature, release branches being made from there to consolidate the features which will actually be part of the next release.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文