[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with git rebase recovery, please

From: John Mandereau
Subject: Re: Help with git rebase recovery, please
Date: Wed, 04 Jul 2012 11:57:10 +0200

Il giorno mer, 04/07/2012 alle 10.31 +0100, Trevor Daniels ha scritto:
> I just made a mistake with git rebase and lost a branch I'd like to recover, 
> but I don't know how or even if it is possible.
> Here's what I did.
> I checked out branch A
> then entered
> git rebase master
> This gave merge conflicts, and the usual three options.
> I decided not to resolve the merge conflicts at this point, but incorrectly 
> entered
> git rebase --skip
> This repositioned branch A at master, apparently losing the changes it 
> previously contained.
> I should have used git rebase --abort I guess.
> So, can I now recover my original branch A?

Look at what

git reflog

says, pick out the truncated committish (the hexa string at the
beginning of line) of the commit you want to check out abcdef1, then

git reset --hard abcdef1


reply via email to

[Prev in Thread] Current Thread [Next in Thread]