SVN:从分支创建一个分支并合并到主干 [英] SVN: Create a branch from branch and merge to trunk

查看:48
本文介绍了SVN:从分支创建一个分支并合并到主干的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个分支 B1,它仍然不稳定,所以它不在主干中.但是我们想要处理来自 B1 的更改,因此我们从 B1 创建了一个分支 B2.

We have a branch B1, and it is still not stable yet so it is not in trunk. But we want to work with changes from B1 so we create a branch B2 from B1.

于是svn copy就做了如下

So svn copy was done as follows

svn copy http://svn/trunk http://svn/B1

svn copy http://svn/B1 http://svn/B2 

几天后,B1 将稳定,B1 将重新集成到主干.

After some days, B1 will be stable and B1 will be reintegrated to trunk.

现在,问题在于将 B2 合并回主干.我们是将B2重新整合回B1然后重新整合到trunk还是直接重新整合B1->trunk和B2->trunk?

Now, the problem lies with merging back of B2 to trunk. Do we reintegrate B2 back to B1 and then reintegrate to trunk or directly reintegrate B1->trunk and B2->trunk?

推荐答案

既然你说你创建 B2 只是为了从 B1 获得最新和最大的变化,那么我会说逻辑上 B2 现在依赖于 B1,所以我会去

Since you stated that you created B2 just to have the latest and greatest changes from B1, then I would say logically B2 is now dependent on B1, so I would go

B2 ---重新整合分支-->主干
B1 ---重新整合分支-->主干

B2 ---reintegrate branch--> trunk
B1 ---reintegrate branch--> trunk

可以先进行重新整合.

您必须确保使用任何新的 Trunk 或 B1 提交来更新 B2,然后您可以在更新到 B2 期间选择如何处理任何冲突.

You have to make sure that you keep B2 updated with any new Trunk or B1 commits, then you can pick during the update to B2 how to handle any conflicts.

只要你这样做,你就可以先提交任一分支.您将能够解决重新整合期间的任何冲突.

As long as you do this, you can commit either branch first. You will be able to resolve any conflicts during the reintegrations.

当我分支时,即使是非常小的更改,我也会分支,这样我每个任务都有一个分支,我可以按照我需要的顺序将它们独立地重新集成到主干中......在大多数情况下.

When I branch, I branch even for very small changes, that way I have a branch per task and I can reintegrate them independently into the trunk in an order I need to...For the most part.

这篇关于SVN:从分支创建一个分支并合并到主干的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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