[Development] Recover from a bad rebase (incorrect squash)

Mandeep Sandhu mandeepsandhu.chd at gmail.com
Mon Oct 21 13:50:07 CEST 2013


Hi All,

Is there a safe to recover from a bad rebase ? I've squashed commits
incorrectly.

Situation before rebase was:

(oldest) A -> B -> C -> D (newest)

I wanted to squash B & D together so during interactive rebase, I
chose 'squash' options for B & D (wrongly assuming that these 2 would
get squashed) which squashed B with A, D with C.

What I should've done probably is to rearrange the commits as A -> B
-> D -> C and then put 'squash' for D which would've merged B & D
together.

Anyhow, is there a way to recover cleanly from this mess? I want to
get the ld commit hostory (before this rebase) back.

Thanks for any tips.

-mandeep



More information about the Development mailing list