我目前正在进行一个关于git集线器的项目,但是我们的开发团队正在使用subversion。我一直在做以下工作,以使git-集线器与我们的svn存储库同步:
git svn rebase
git pull origin master
git push origin master它一直运行得很好,但是不知怎么的,我搞砸了一些东西,现在我在做重基时遇到了一个文件的问题:
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中的文件,现在我遇到了这个问题。奇怪的是,自述文件没有出现在我当前的git母版中。我试着从我的svn主干中删除它,但这并没有什么区别。我已经解决了冲突,重新添加了文件等,但没有任何效果.我甚至删除了本地的git,重新开始。一定有东西被腐蚀了。
我也尝试过git重基--跳过,但这给了我:
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$ 有人知道我怎么解决这个问题吗?快把我逼疯了。我根本不需要自述文件,所以我不在乎是否要把它吹掉,重新创建它。谢谢!
发布于 2010-10-04 14:24:29
你试过git rebase --skip了吗?维持一个单独的git回购将是很麻烦的。git dcommit重写本地git提交(即更改SHA-1校验和)。因此,在您的正常工作流中:
git pull做两件事,一个git fetch和一个git merge。合并可能是个麻烦。另外,在最后一次提交中,本地git提交被更改,不再匹配在前一个命令中推到github的内容。
您可以在git 这里上阅读。
https://stackoverflow.com/questions/3855197
复制相似问题