与发展,分期和生产分支git [英] git with development, staging and production branches

查看:181
本文介绍了与发展,分期和生产分支git的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这篇文章听起来很有趣,但我很肯定这些图表是错误的。
http://guides.beanstalkapp.com/version-control /branching-best-practices.html

This article sounds interesting, but I'm pretty sure the diagrams are wrong. http://guides.beanstalkapp.com/version-control/branching-best-practices.html

不应该是开发> <$ c

Shouldn't it be DEVELOPMENT > STAGING > PRODUCTION?


合并 c <> code>生产应该只向一个方向流动:从功能和bug修复
在他们自己的分支或开发中进行测试的阶段。
经过测试,您可以将开发中的这些更改合并到
产品中。

Merges should only flow in one direction: from feature and bug-fixes done in their own branch or in development into staging for testing. Once tested, you can merge those changes from development into production.

这里我有点困惑。所以我将分段合并到Master或Master到分段?

Here I get a bit confused. So I merge Staging to Master or Master to Staging?

我使用一个名为SmartGit的客户端,我对此感到困惑。通常,我为某个功能创建一个分支,将其提交到该分支,然后切换到主并将其合并到分支(向前)。因此,在这个新的工作流程中,使用Staging and Production创建这两个额外的分支,然后为主功能创建一个来自master(aka dev)的分支。提交它,然后切换到分段并合并(转发)到我的功能分支?这听起来是正确的吗?

I'm using a client called SmartGit and I get confused about this point. Normally I make a branch for a feature, commit to it, then switch to master and merge it to the branch (forward). So in this new workflow with Staging and Production, I create these two extra branches, then create a branch from master (aka dev) for my feature. Commit to it, then switch to Staging and merge (forward) to my feature branch? Does that sound correct?

其实这是如此令人困惑的是,Beanstalk人站在他们非常不标准的使用背后Staging(它在它们的图中发展之前,它不是一个错误!
https:// twitter.com/Beanstalkapp/status/306129447885631488

Actually what made this so confusing is that the Beanstalk people stand behind their very non-standard use of Staging (it comes before development in their diagram, and it's not a mistake! https://twitter.com/Beanstalkapp/status/306129447885631488

已经决定忘记Beanstalk,仅仅用Github。

Have decided to forget about Beanstalk and just with Github.

由于我发布了这个,Beanstalk人员接受了我的提示并重新命名了他们的阶段,现在调用DevelopmentStable。

Since I posted this, the Beanstalk people took my hint and renamed their stages, now calling Development "Stable".

推荐答案

这里的思考过程是,您大部分时间都花在开发上,开发时创建一个特性分支(关闭开发),完成该特性,然后合并回到 development ,然后将其添加到最终生产版本中合并为生产

The thought process here is that you spend most of your time in development. When in development, you create a feature branch (off of development), complete the feature, and then merge back into development. This can then be added to the final production version by merging into production.

请参阅一个成功的Git分支模型,以获取关于此方法的更多详细信息。

See A Successful Git Branching Model for more detail on this approach.

这篇关于与发展,分期和生产分支git的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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