git version 1.7.1
svn, version 1.6.12
Ubuntu 10.10我刚用过git,我用过svn。但是我还没有一起用过。我有一个git存储库,我不得不将我的存储库更多地转换为subversion存储库。所以我一直在使用git-svn。这在大多数情况下都可以正常工作。然而,我发现它是在绕圈子。
我是唯一一个从事这个项目的人。
我对我的分支做了一些更改。然后我把它们搬上舞台:
git stage gateway.c然后在本地将它们提交到git:
git commit m"Made some changes"然后我想把它们提交给subversion。获取最新更新:
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然后我再做一次rebase:
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这将我放在一个名为的分支上,这个分支是什么,它是用来做什么的?:
*(no branch)然后,我将冲突解决到该分支。然后我签出我的play_video分支。我试着做另一个:
svn git dcommit结果我又绕了一圈。
在我开始胡思乱想之前,能给我点建议吗,
非常感谢您的建议,
发布于 2010-12-14 21:05:30
没有一个完整的答案,但似乎可以肯定的是:
*(no branch)意味着你最终进入了DETACHED HEAD模式,你可以在"Can I recover lost commits in a SVN repository using a local tracking git-svn branch?“中的git svn上下文中看到它。
另请参阅"Why did git detach my head?“。
因此,请确保:
在每一步,你都不是在一个分离的头(无分支)中,而是你在你的SVN存储库中存在一个分支(而不是一个纯粹的本地分支)
dcommit 发布于 2010-12-17 00:24:19
你有没有用Google instructions here把你的git repo导入svn?在使用这些指令后,我遇到了一个类似的错误:最初的导入很好,但后来出现了一些错误,我无法推送后续的提交。
我通过git svn init-ing解决了这个问题,这是一个新的git repo来跟踪我的svn repo。
发布于 2011-09-10 01:49:23
解决冲突后,您需要在运行git svn dcommit之前运行git rebase --continue
https://stackoverflow.com/questions/4436427
复制相似问题