分支建议 - DEV或PROD应该是“主要”吗? [英] Branching Advice - should DEV or PROD be "Main"?

查看:244
本文介绍了分支建议 - DEV或PROD应该是“主要”吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


目前我们没有分支机构,我们实际上正在进行持续交付,默认情况下会禁用功能,但始终会发货。


虽然这在实践中起作用,但我们正在考虑使用Dev和Prod,其中一个是Main - 但我无法确定哪个应该是主要的。


假设: 

新功能应用于DEV,然后在完成DEV时提升。

错误修复应用于PROD并合并回DEV。


是否存在任何利弊/最佳实践(DEV / Prod as Main),因为我们需要尽量减少运输不完整/已启用(即我们目前所处的位置)的风险。



谢谢

解决方案

您好Fetchez,


也许你可以考虑拥有这样的结构Dev< - Main - > ; PROD。您可以将项目分支为"主要"分为两个,一个名为"Dev",另一个名为"Prod"。
所有用户在测试代码后都可以在Dev分支中工作,然后合并到Main分支。当您想要发布项目时,可以将代码从Main分支合并到Prod分支。在Prod分支上,您可以应用错误修复,然后合并回
主分支,并从Main分支合并到Dev分支。


最好的问候,





Hi,

Currently we have no branches, and we are effectively doing Continuous Delivery whereby functions are disabled by default but always shipped.

While this is working in practice we're thinking of having a Dev and Prod, one of which is Main - but I can't work out which should actually be main.

Assumptions: 
New Functions applied to DEV, then promoted when complete to DEV.
Bug Fixes applied to PROD and Merged back into DEV.

Are there any pros / cons / best practices for either (DEV / Prod as Main) as the feeling is we need to minimise the risk of shipping something incomplete / that's enabled (i.e. where we currently are).

Thanks

解决方案

Hi Fetchez,

Maybe you can consider to have a structure like this Dev <-- Main --> Prod. You can branch your project "Main" into two, one named "Dev", the other one named "Prod". All users can work in Dev branch, after they test their code, then merge to Main branch. When you want to release your project, you can merge your code from Main branch to Prod branch. On Prod branch, you can apply bug fixes and then merge back to Main branch, and merge from Main branch to Dev branch.

Best regards,



这篇关于分支建议 - DEV或PROD应该是“主要”吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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