在SVN中将分支与主干合并时如何解决树冲突? [英] How do I resolve the tree conflict when merging branch with trunk in SVN?

查看:50
本文介绍了在SVN中将分支与主干合并时如何解决树冲突?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在trunk"文件夹中有一个项目.当我需要创建一个分支时,我将trunk"文件夹的内容复制到一个新的branch"文件夹中.结果,目录结构看起来像这样.

I have a project in the 'trunk' folder. When I needed to create a branch, I copied the contents of the 'trunk' folder into a new 'branch' folder. As a result, the directory structure looks like this.

现在我想将分支和主干的内容合并到主干文件夹中.我怎样才能做到这一点?

Now I want to merge the contents of the branch and the trunk into the trunk folder. How can I achieve that?

我尝试从 tortoise SVN 的合并菜单中选择合并两个不同的树".

I tried by selecting 'Merge two different trees' from the Merge menu of tortoise SVN.

我在 FROM 字段中输入了主干 URL,在 TO 字段中输入了分支 URL.

I entered the trunk URL in the FROM field and the branch URL in the TO field.

但是,它会为每个文件夹提供错误树冲突",因为Trunk"和Branch1"中的文件夹名称相同.我希望合并这些文件夹的内容.

However, it gives the error 'Tree Conflict' for every folder because the names of the folders in 'Trunk' and 'Branch1' are the same. I want the contents of these folders to merge.

推荐答案

我复制了内容

当使用tortoiseSVN时,你应该使用create branche函数(branch/tag在windows上下文菜单中),这样分支和主干就会知道它们之间的关系.这是为了避免树冲突而导入的

You should use create branche function (branch/tag in windows context menue when using tortoiseSVN), so the branch and trunk will know there relationship. This is imported to avoid tree conflicts

我尝试选择合并两个不同的树".

I tried by selecting 'Merge two different trees'.

最好使用重新整合分支"(最适合您的目的)或合并一系列修订版".

Better use 'Reintegrate a branch' (best for your purpose) or 'Merge a range of revision'.

这篇关于在SVN中将分支与主干合并时如何解决树冲突?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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