2010-12-14 14 views
8
git version 1.7.1 
svn, version 1.6.12 
Ubuntu 10.10 

私はちょうどgitと私はsvnを使用しています。しかし、私は一緒に使用していない。私はgitリポジトリを持っていました。だから私はgit-svnを使っています。ほとんどの場合、大丈夫です。しかし、私は円で円を見つける。git-svn rebaseとdcommitの問題

私はこのプロジェクトに取り組んでいる唯一の人です。

私のブランチにいくつか変更を加えました。私は、それらをステージ:

git stage gateway.c 

を次にのgitにローカルにコミット:

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 

私は、と呼ばれる枝に私を置くと、wこのブランチは何のためのものなのですか?:

*(no branch) 

次に、そのブランチへの競合を解決します。次に私のplay_videoブランチをチェックアウトします。私は別のものを作ろうとします:

svn git dcommit 

そして、私はもう一度円を丸くしてしまいます。

私は私の髪を引っ張っ開始する前に、いくつかは、私にいくつかのアドバイス、任意の提案のための

多くのおかげで、

+0

を実行する前に、git rebase --continueを実行する必要があります...あなたの助けのため – Quartz

答えて

3

ない完全な答えを提供することができますが、どのような特定のようだがそれは次のとおりです。

*(no branch) 

は、DETACHED HEADモードになり、git svnコンテキストでは "Can I recover lost commits in a SVN repository using a local tracking git-svn branch?"と表示されます。
Why did git detach my head?」も参照してください。あなたdcommitあなたがデタッチHEADにない各ステップ(ノー支店)で

  • あなたのSVNのレポ(とない純粋なローカルのGitブランチに存在するブランチ:

    ので、確認してください)

+0

感謝。私はこれをチェックしている。 – ant2009

+0

私は自分がここにこだわっていて、さまざまなgitコマンドを実行しようとしましたが、それ以上のsvnマージを行う前にgit svn dcommitを実行していました。 – hellatan

+0

@dtan:あなたに助けが必要な問題やエラーメッセージはありますか? – VonC

1

git repoをsvnにインポートするには、Googleの指示hereを使用しましたか?これらの命令を使用した後も同様のエラーが発生しました。最初のインポートはうまくいっていましたが、何かが間違って行かれ、後続のコミットをプッシュできませんでした。

私はちょうどgit svn init - 私のsvnレポを追跡するために新鮮なgit repoで解決しました。

1

あなたの競合を解決した後は、ほぼ3年とは示唆...ここに同じ問題を抱えてgit svn dcommit

+0

git rebase - コミットするものは何もないと言うだけです。 – Quartz