首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >git svn重基由于与git中不存在的文件的冲突而失败。

git svn重基由于与git中不存在的文件的冲突而失败。
EN

Stack Overflow用户
提问于 2010-10-04 12:28:24
回答 1查看 7.1K关注 0票数 7

我目前正在进行一个关于git集线器的项目,但是我们的开发团队正在使用subversion。我一直在做以下工作,以使git-集线器与我们的svn存储库同步:

代码语言:javascript
复制
git svn rebase
git pull origin master
git push origin master

它一直运行得很好,但是不知怎么的,我搞砸了一些东西,现在我在做重基时遇到了一个文件的问题:

代码语言:javascript
复制
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重基--跳过,但这给了我:

代码语言:javascript
复制
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$ 

有人知道我怎么解决这个问题吗?快把我逼疯了。我根本不需要自述文件,所以我不在乎是否要把它吹掉,重新创建它。谢谢!

EN

回答 1

Stack Overflow用户

发布于 2010-10-04 14:24:29

你试过git rebase --skip了吗?维持一个单独的git回购将是很麻烦的。git dcommit重写本地git提交(即更改SHA-1校验和)。因此,在您的正常工作流中:

  • 变更码
  • 致力于github
  • 变更码
  • 致力于github
  • git svn重基
  • git拉源母机
  • git推送原主
  • git svn dcommit

git pull做两件事,一个git fetch和一个git merge。合并可能是个麻烦。另外,在最后一次提交中,本地git提交被更改,不再匹配在前一个命令中推到github的内容。

您可以在git 这里上阅读。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/3855197

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档