git-svn rebase和dcommit问题 [英] git-svn rebase and dcommit problem

查看:759
本文介绍了git-svn rebase和dcommit问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  git版本1.7.1 
svn,版本1.6.12
Ubuntu 10.10

我只是混帐,我用svn。但我还没有一起使用过。我有一个git存储库,我不得不更多我的存储库到一个颠覆之一。所以我一直在使用git-svn。在大多数情况下,这很好。然而,我发现这是一个圈子。



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



I对我的分支进行一些更改。然后我将它们分级:

  git stage gateway.c 

然后将它们本地提交到git:

  git commit mMade some改变

然后我想提交它们进行颠覆。获取最新更新:

  git svn rebase 

然后我得到以下消息:

 看来我无法创建一个rebase -apply目录和
我不知道你是否在补丁应用程序或另一个
rebase中。如果情况并非如此,请
rm -fr /home/joe/projects/gateway/.git/rebase-apply
并再次运行我。如果您在那里仍然有
的价值,我会停下来。
rebase refs / remotes / trunk:command返回错误:1

然后执行以下操作:
rm -fr /home/joe/projects/gateway/.git/rebase -apply

然后我再次进行rebase:

  git svn rebase 

消息是这样的:

 首先,倒带头重播你的作品...... 
应用:用户上下文。
使用索引信息重建基础树...
回退到修补基础和3路合并...
自动合并driver.c
自动合并网关.c
CONFLICT(内容):在gateway.c中合并冲突
在更改中合并失败。
补丁在0001问题上失败,从用户上下文中获取端口。

当你解决这个问题时,运行git rebase --continue。
如果您希望跳过此修补程序,请运行git rebase --skip。
要恢复原始分支并停止重新分配运行git rebase --abort。

rebase refs / remotes / trunk:command returned error:1

其中把我放在一个叫做分支的分支上,这是什么分支?

  *(no分支)

然后解决冲突到那个分支。然后我检查我的play_video分支。我尝试做另一个:

  svn git dcommit 

最后我再次围绕圈子。



在我开始拉我的头发之前,有人可以提供给我一些建议,

非常感谢您的任何建议,

解决方案

否一个完整的答案,但似乎确定的是:

  *(无分支)

意味着你最终在 DETACHED HEAD 模式下,你可以在git svn上下文中看到我可以使用本地跟踪git-svn分支恢复SVN存储库中的丢失提交吗?

另请参阅为什么git会分离我的脑袋?




  • 步骤你不在一个分离的HEAD(无分支)

  • ,你 dcommit 一个存在于SVN仓库中的分支一个纯粹的本地Git分支)


git version 1.7.1
svn, version 1.6.12
Ubuntu 10.10

I have just git and I have used svn. But I haven't used then together. I had a git repository, and I had to more my repository to a subversion one. So I have been using git-svn. Which works ok, most of the time. However, I find going round in circles.

I am the only one working on this project.

I make some changes to my branch. I then stage them:

git stage gateway.c

Then commit them locally to git:

git commit m"Made some changes"

Then I want to commit them to subversion. Get the latest updates:

git svn rebase

Then I get the following message:

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

Then I do a rebase again:

git svn rebase

The message is this:

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

Which puts me on a branch called, and what is this branch and what is it for?:

*(no branch)

I then resolve the conflicts to that branch. I then checkout my play_video branch. I try to make a another:

svn git dcommit

And I end up going round in circles again.

Before I start pulling my hair out, can some offer me some advice,

Many thanks for any suggestions,

解决方案

No a complete answer, but what seems certain is that:

*(no branch)

means you end up in a DETACHED HEAD mode which you see in a git svn context in "Can I recover lost commits in a SVN repository using a local tracking git-svn branch?".
See also "Why did git detach my head?".

So make sure:

  • at each step you are not in a detached HEAD (no branch)
  • that you dcommit a branch which exists in your SVN repo (and not a pure local Git branch)

这篇关于git-svn rebase和dcommit问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆