git-svn重基和dcommit问题

git-svn重基和dcommit问题,svn,git,git-svn,Svn,Git,Git Svn,我只有git,我使用了svn。但我没有一起用过。我有一个git存储库,我必须将我的存储库升级为subversion存储库。所以我一直在使用git svn。大多数情况下,它都能正常工作。然而,我发现自己在兜圈子 我是唯一一个在这个项目上工作的人 我对我的分支做了一些更改。然后,我将他们分阶段: git version 1.7.1 svn, version 1.6.12 Ubuntu 10.10 然后将它们本地提交到git: git stage gateway.c 然后我想让他们去颠覆。获取最新

我只有git,我使用了svn。但我没有一起用过。我有一个git存储库,我必须将我的存储库升级为subversion存储库。所以我一直在使用git svn。大多数情况下,它都能正常工作。然而,我发现自己在兜圈子

我是唯一一个在这个项目上工作的人

我对我的分支做了一些更改。然后,我将他们分阶段:

git version 1.7.1
svn, version 1.6.12
Ubuntu 10.10
然后将它们本地提交到git:

git stage gateway.c
然后我想让他们去颠覆。获取最新更新:

git commit m"Made some changes"
然后我得到以下信息:

git svn rebase
然后我再做一次重基:

It seems that I cannot create a rebase-apply directory, and
I wonder if you are in the middle of patch application or another
rebase.  If that is not the case, please
        rm -fr /home/joe/projects/gateway/.git/rebase-apply
and run me again.  I am stopping in case you still have something
valuable there.
rebase refs/remotes/trunk: command returned error: 1

I then doing the following:
rm -fr /home/joe/projects/gateway/.git/rebase-apply
信息如下:

git svn rebase
这把我放在一根叫做的树枝上,这根树枝是干什么用的

First, rewinding head to replay your work on top of it...
Applying: Issue with getting the port from the user context.
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging driver.c
Auto-merging gateway.c
CONFLICT (content): Merge conflict in gateway.c
Failed to merge in the changes.
Patch failed at 0001 Issue with getting the port from the user context.

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
然后,我将冲突解决到该分支。然后我签出我的play_视频分支。我试着做另一个:

*(no branch)
最后我又绕圈子了

在我开始拔头发之前,有人能给我一些建议吗


非常感谢您的建议,

没有完整的答案,但似乎可以肯定的是:

svn git dcommit
意味着您最终将进入一种“分离头”模式,您可以在“.”中的git svn上下文中看到这种模式。
另见“”

因此,请确保:

  • 在每一步中,您都不是处于分离的头部(无分支)
  • dcommit
    存在于您的SVN回购中的分支(而不是纯本地Git分支)

您是否使用谷歌说明将git回购导入svn?在使用这些指令之后,我遇到了一个类似的错误:最初的导入进行得很顺利,但在某个地方出了问题,我无法推动后续的提交


我通过使用新的git回购来跟踪我的svn回购来解决它。

解决冲突后,您需要运行git rebase--continue在运行git svn dcommit之前,我遇到了类似的问题,很可能是因为我在按下SVN遥控器之前先按下了我的git遥控器,从而弄乱了我的git历史记录。似乎每次我尝试向svn提交某些内容时,git都会尝试重播我以前的所有提交,即使它们已经存在于svn中,所以我只需执行
git rebase--跳过
,直到我返回到最新的提交,但最简单的解决方案可能是只克隆一个新的git svn。

谢谢您的帮助。我正在检查。我发现自己被困在这里,我尝试执行了一系列不同的git命令,但在我能够执行任何进一步的svn合并之前,最终运行了git svn dcommit。@dtan:是否有任何问题或错误消息需要帮助?@VonC-否,我很久以前也遇到过这个问题,最近又遇到了。我只知道试图破译到底发生了什么并不好玩,但现在我至少知道当我再次遇到这个问题时该怎么办了。谢谢,虽然这个答案不正确,但任何时候当你有一个不完整的再基地(svn或其他),你是在一个分离的头离开。我在git合并和随后的“git svn rebase”方面也遇到了问题。这里也有同样的问题。。。差不多3年了,没有任何建议…git rebase--continue只是说没有什么可承诺的。再想想2秒钟,我意识到每次我推到svn后,我都是从远程git上拉的,这又拉错了git历史记录。我对git remote做了一次强制推送,它一劳永逸地解决了历史差异,现在重新设置基础的问题已经消失了。
*(no branch)