[Top][All Lists]

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

Re: Help with git rebase recovery, please

From: Phil Holmes
Subject: Re: Help with git rebase recovery, please
Date: Wed, 4 Jul 2012 14:55:19 +0100

----- Original Message ----- From: "David Kastrup" <address@hidden>
To: <address@hidden>
Sent: Wednesday, July 04, 2012 12:20 PM
Subject: Re: Help with git rebase recovery, please

"Trevor Daniels" <address@hidden> writes:

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?

You already got one answer that is more appropriate right now,
probably.  What I tend to do right after goofing up is something along
the line of

git reset --hard "address@hidden minutes ago}"

Yes, git understands that quite as written.

David Kastrup

If you're not quite sure of the changes you want to make, can you get help with

git reset --hard "address@hidden minutes from now}

?  :-)

Phil Holmes

reply via email to

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