我在Git存储库中有一些需要与SVN存储库同步的代码。我的食谱是这样的:
revision
git svn clone -T '/trunk' <REPO>
git pull dev <ORIGINAL_BRANCH>。现在我在存储库中有了我的主分支,它基于初始的SVN commit.git svn rebase,然后是dcommit.然而,步骤5)在以下方面失败:
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging X
Applying: Y
Applying: Z
Using index info to reconstruct a base tree...
<stdin>:269: trailing whitespace.
<stdin>:315: trailing whitespace.
<stdin>:400: trailing whitespace.
* Method 2.6. Returns zero or two elements
<stdin>:3762: trailing whitespace.
warning: 4 lines add whitespace errors.
Falling back to patching base and 3-way merge...接着是几条“自动合并”和“冲突(内容)”消息,最后,数据库以友好的方式停止,“更改中未能合并”。我能做些什么来自动解决这些冲突吗?我甚至不明白如何冲突会发生时,重新基地!
发布于 2010-11-18 21:31:19
我放弃了,转而使用set-tree。git rebase -p会产生一个历史,在根上使用人工的git-svn初始提交,然后是原始Git存储库的初始提交.
为了完整起见,我对这三种方法的引用尝试了:
git rebasegit svn rebaseset-tree发布于 2010-11-18 14:34:11
冲突是冲突,而git永远也无法真正为你解决它们。只有人才能肯定地说,两种相互排斥的修改中哪一种是正确的。
为什么你会在重新基地的时候发生冲突呢?它和合并是完全相同的操作,只是导致了不同的历史。假设在这里将commit X重新定位到commit D上:
- A - B - C - D
\
X生成的内容应该与将D合并到X中一样。如果commit B中有与commit X中的更改相冲突的内容,则会出现合并冲突。不管你是合并还是重新建立基础。
https://stackoverflow.com/questions/4215726
复制相似问题