git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-svn dcommit gone wrong and git-fsck
@ 2008-08-26 16:37 Bruno Harbulot
  2008-08-26 17:36 ` Björn Steinbrink
  0 siblings, 1 reply; 3+ messages in thread
From: Bruno Harbulot @ 2008-08-26 16:37 UTC (permalink / raw)
  To: git

Hello,

I had 11 consecutive commits in my local git repository that I was 
trying to commit to an SVN repository, using "git-svn dcommit". The 
first 7 worked fine, as usual. However, when sending the 8th, I got a 
"Bus error" (on OSX -- I'm not sure what the actual cause was).

A further "git-svn dcommit" produces this error.
Cannot dcommit with a dirty index.  Commit your changes first, or stash 
them with `git stash'.
  at /opt/local/bin/git-svn line 406

In addition, "gitk --all" no longer shows commits 8->11, but the current 
files seem to correspond to the last local commit.
I've run git-fsck which shows 3 dangling trees and about a dozen 
dangling blobs.

Apologies if it's a FAQ, but I can't seem to find much documentation on 
how this can be fixed (if it can). Is there a way to recover the missing 
commits and re-attach them back on the branch? (I had pushed that branch 
up to the 10th commit into another repository, which could help.)


Thank you,

Bruno.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: git-svn dcommit gone wrong and git-fsck
  2008-08-26 16:37 git-svn dcommit gone wrong and git-fsck Bruno Harbulot
@ 2008-08-26 17:36 ` Björn Steinbrink
  2008-08-26 18:01   ` Bruno Harbulot
  0 siblings, 1 reply; 3+ messages in thread
From: Björn Steinbrink @ 2008-08-26 17:36 UTC (permalink / raw)
  To: Bruno Harbulot; +Cc: git

On 2008.08.26 17:37:36 +0100, Bruno Harbulot wrote:
> Hello,
>
> I had 11 consecutive commits in my local git repository that I was  
> trying to commit to an SVN repository, using "git-svn dcommit". The  
> first 7 worked fine, as usual. However, when sending the 8th, I got a  
> "Bus error" (on OSX -- I'm not sure what the actual cause was).
>
> A further "git-svn dcommit" produces this error.
> Cannot dcommit with a dirty index.  Commit your changes first, or stash  
> them with `git stash'.
>  at /opt/local/bin/git-svn line 406

1. git checkout $your_branch

2. Look up the latest commit you had on your branch using "git reflog"
   or "git log -g"

3. git reset --hard $that_commit

4. git svn rebase

5. check that your history is sane

6. git svn dcommit

That should do.

Björn

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: git-svn dcommit gone wrong and git-fsck
  2008-08-26 17:36 ` Björn Steinbrink
@ 2008-08-26 18:01   ` Bruno Harbulot
  0 siblings, 0 replies; 3+ messages in thread
From: Bruno Harbulot @ 2008-08-26 18:01 UTC (permalink / raw)
  To: git



Björn Steinbrink wrote:
> On 2008.08.26 17:37:36 +0100, Bruno Harbulot wrote:
>> Hello,
>>
>> I had 11 consecutive commits in my local git repository that I was  
>> trying to commit to an SVN repository, using "git-svn dcommit". The  
>> first 7 worked fine, as usual. However, when sending the 8th, I got a  
>> "Bus error" (on OSX -- I'm not sure what the actual cause was).
>>
>> A further "git-svn dcommit" produces this error.
>> Cannot dcommit with a dirty index.  Commit your changes first, or stash  
>> them with `git stash'.
>>  at /opt/local/bin/git-svn line 406
> 
> 1. git checkout $your_branch
> 
> 2. Look up the latest commit you had on your branch using "git reflog"
>    or "git log -g"
> 
> 3. git reset --hard $that_commit
> 
> 4. git svn rebase
> 
> 5. check that your history is sane
> 
> 6. git svn dcommit
> 

Thanks a lot! It works.


Best wishes,

Bruno.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-08-26 18:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-26 16:37 git-svn dcommit gone wrong and git-fsck Bruno Harbulot
2008-08-26 17:36 ` Björn Steinbrink
2008-08-26 18:01   ` Bruno Harbulot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).