每个版本的分支与代码升级分支?

发布于 2024-09-16 09:59:34 字数 283 浏览 2 评论 0原文

What are the advantages/disadvantages of Branch per Release versus Code-Promotion Branches strategies?

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

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

发布评论

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

评论(1

我纯我任性 2024-09-23 09:59:34

进行分支的主要原因是为了隔离开发工作。

因此,这实际上取决于您认为最需要隔离的内容:给

  • 定版本的升级工作(这将隔离该升级步骤中的提交:测试、集成或产品/修补程序)、
  • 发布工作(包括单元测试、集成、生产)阶段一个接一个)

代码升级允许每个版本并行升级工作(您开发 n+2,同时测试 n+1 并维护 n)。
虽然每个版本的分支允许更简单、更连续的开发周期,您主要在开发 n+1 的同时测试和维护 n。

无论选择哪种策略,您都需要解决 n 和 n+1 之间的同步步骤(什么时候合并从 n 到 n+1 的演变?):

  • 使用 Code-Promotion,您可以在不同步骤进行合并
  • 使用每个版本的分支,您通常只从一个版本合并到另一个版本的当前开发状态​​。

所以基本上,代码升级策略意味着更多的分支、更多的合并以及在这些分支中保留和隔离的历史记录的更精确。
但这也意味着需要设置和管理更多的环境。

每个版本的分支更加简单(前提是您能够知道您正在处理的内容实际上最终将成为下一个版本的一部分)。

The main reason why you branch is to isolate a development effort.

So that really depends what you deem most important to isolate:

  • a promotion effort for a given release (which will isolate commits within that promotion step: testing, integration or prod/hotfixes)
  • a release effort (which will include unit testing,integration,production phases all one after the other)

The Code-Promotion allows for parallel promotion efforts per release (you develop n+2 while testing n+1 and maintaining n).
While Branch per Release allows for a simpler more sequential development cycle where you mainly test and maintain n while developing n+1.

Whatever the chosen strategy is, you need to address the synchronization step between n and n+1 (what and when do you merge evolutions from n to n+1?):

  • With Code-Promotion you can merge at different steps
  • With Branch per Release, you generally merge only from one release to the current state of development for the other release.

So basically, the Code-Promotion strategy means more branches, more merge and more precisions in the history being kept and isolated in those branches.
But it means also more environment to setup and manage.

The Branch Per Release is more straightforward (provided you are able to know that what you are working on will actually end up being part of the next release).

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