我目前正在使用git-hub上的项目,但我们的开发团队正在使用subversion。我一直在做以下,以保持git的枢纽同步与我们的SVN仓库:git svn rebase与git中不存在的文件发生冲突失败
git svn rebase
git pull origin master
git push origin master
这一直工作正常,但不知何故,我已经弄乱的东西了,现在我有一个问题,一个文件时,我做的rebase:
Craig-Nakamotos-MacBook-Pro:cl4 cnakamoto$ git svn rebase
First, rewinding head to replay your work on top of it...
Applying: minor fix to table class
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
Applying: adding README file
Applying: adding README file
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
Applying: adding README file
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
Applying: adding README file
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
Applying: adding README file
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
Applying: adding README file
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
Applying: adding README file
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
Applying: adding README file
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
Applying: adding README file
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
Applying: adding README file
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
Applying: adding README file
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
Applying: adding README file
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
Applying: adding README file
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
Applying: adding README file
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
Applying: adding README file
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
Applying: adding README file
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.
Applying: remove README, will re-add via svn
Applying: trying to fix readme
Applying: adding README file
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging README
CONFLICT (add/add): Merge conflict in README
Failed to merge in the changes.
Patch failed at 0020 adding README file
When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".
rebase refs/remotes/trunk: command returned error: 1
我必须删除并重新添加git和/或svn中的文件,现在我有这个问题。奇怪的是README文件没有出现在我当前的git master中。我尝试从我的svn主干中删除它,但这没有什么区别。我解决了冲突并重新添加了文件等无济于事。我甚至删除了我的本地git并重新开始。东西必须被损坏。
我也尝试过的git变基--skip,但是这给了我:
Craig-Nakamotos-MacBook-Pro:cl4 cnakamoto$ git rebase --skip
HEAD is now at c4da146 trying to fix readme
Applying: remove README, will re-add via svn
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
CONFLICT (delete/modify): README deleted in remove README, will re-add via svn and modified in HEAD. Version HEAD of README left in tree.
Failed to merge in the changes.
Patch failed at 0021 remove README, will re-add via svn
When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".
Craig-Nakamotos-MacBook-Pro:cl4 cnakamoto$
有谁知道我怎么能解决这个问题?这让我疯狂。我根本不需要README文件,所以我不在乎是否必须吹掉它并重新创建它。谢谢!
我确实尝试了git rebase --skip,但那给了我更多的错误,我会将它们添加到我原来的问题中。 – 2010-10-04 15:11:09
p.s.感谢您试图帮助并澄清,我们基本上不会通过git进行更改,我只是从我们的颠覆回购更新git master,所有更改都是在svn中完成的,所以我希望它不应该是太麻烦了 – 2010-10-04 15:15:02