合并功能分支以发布分支而不是主干
我有一个关于两个源代码控制场景的问题,这两个场景都具有功能分支和发布分支:
- 在场景 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于分支都是关于隔离(请参阅“何时应该分支),这两种场景之间的区别在于您希望主干
主干
具有的角色:场景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.