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:
dcommit
a branch which exists in your SVN repo (and not a pure local Git branch)