On 16/05/10, Robert P. J. Day wrote:
> SCENARIO: most recent 5 commits on a clean, linear history branch:
>
> ... X <--- A <--- B <--- C <--- D <--- E (HEAD)
>
> suddenly, i wish i hadn't done A, but want to leave the more recent
> commits on that branch (rebased of course).
>
> pretty sure i can do an interactive rebase, as in:
>
> $ git rebase -i X
In fact, I've done this before and lost a merge in the process due to the
interactive option, so I think you might need to do:
git rebase -i A~
> oh, wait, can't i just rebase B onto X? effectively, i want to
> reproduce the work from B to E as if it originated at X; isn't that
> just a regular rebase? thoughts?
I've never done it, but I was re-reading that manpage recently and I think you
can just do:
git rebase --onto X B E
> rday
slainte mhath, RGB
--
Richard Guy Briggs -- ~\ -- ~\ <hpv.tricolour.ca>
<www.TriColour.ca> -- \___ o \@ @ Ride yer bike!
Ottawa, ON, CANADA -- Lo_>__M__\\/\%__\\/\%
Vote! -- <greenparty.ca>_____GTVS6#790__(*)__(*)________(*)(*)_________________
_______________________________________________
Linux mailing list
[email protected]
http://oclug.on.ca/mailman/listinfo/linux