解决树冲突 [英] Resolving tree conflict

查看:445
本文介绍了解决树冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何解决当前场景中的树冲突.

How to resolve tree conflict in current scenerio.

C:\DevBranch
C:\MyBranch

我更新了两个分支.编辑MyBranch,然后重新提交.现在想将这些更改合并到DevBranch中.当我进行合并时,我会遇到树冲突"

I updated both branches. Edited MyBranch and then committed back. Now want to merge those changes into DevBranch. When I am doing the merge I am getting 'Tree Conflicts'

The last merge operation tried to add the file 'abc.def', but it was already added locally.

How do you want to resolve this conflict?
Keep the file from repository
Keep the local file

我该如何解决?

推荐答案

解决冲突的方法是

svn resolve --accept working -R <path>

其中<path>是您遇到冲突的地方(可以是回购的根源).

where <path> is where you have your conflict (can be the root of your repo).

说明:

  • resolve要求svn解决冲突
  • accept working指定保留您的工作文件
  • -R代表递归
  • resolve asks svn to resolve the conflict
  • accept working specifies to keep your working files
  • -R stands for recursive

希望这会有所帮助.

总结以下评论中的内容:

To sum up what was said in the comments below:

  • <path>应该是有冲突的目录(对于OP,为C:\DevBranch\)
  • 冲突的根源很可能是
    • 使用svn switch命令
    • 或在创建分支机构时已选中Switch working copy to new branch/tag选项
    • <path> should be the directory in conflict (C:\DevBranch\ in the case of the OP)
    • it's likely that the origin of the conflict is
      • either the use of the svn switch command
      • or having checked the Switch working copy to new branch/tag option at branch creation

      这篇关于解决树冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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