Recover history from foolish git-svn merge

Posted by Gregg Lind on Stack Overflow See other posts from Stack Overflow or by Gregg Lind
Published on 2010-06-09T00:08:46Z Indexed on 2010/06/09 0:12 UTC
Read the original article Hit count: 327

Filed under:
|

the players:

master: the svn branch (actual, not local trackign) mybranch: a local branch

My mistake:

[master] git svn rebase
[master] git merge mybranch
[master] git svn dcommit

I did this twice.

Is there a way I can remedy all this? I was thinking something like:

  1. git checkout --hard [commit before the merging]
  2. git dcommit # that to the svn?
  3. git rebase mybranch
  4. git dcommit

But this doesn't seem to work.

(I know I should a. working from a local tracking branch and b. have rebased rather than merged)

I'm in the frantic / willing to send beer to respondents stage :)

© Stack Overflow or respective owner

Related posts about git

Related posts about git-svn