On Wed, Jun 11, 2008 at 05:04:25AM +0000, Luke Lu wrote: > git rebase --abort, I think, would actually blow away my last commit (I > sneaked in) though. git reset --hard to that last commit is probably the > right thing to do. The least confusing option would be to update the > error message to be a bit more informative, like "Did you change the > branch while rebasing? git reset --hard to your last known commit and > redo the rebase". Yet another safeguard would be for git commit to check > if there is a rebase in progress and warn or abort the commit. OTOH the commit you did has been your HEAD for a moment, so it's easily cherry-pickable from your reflog. So I'd go for the git rebase --abort route, redo the rebase, and once done, then run git reflog and find the commit that you want to get back, and cherry-pick it with its proper reflog name: git cherry-pick HEAD@{nnn}. -- ·O· Pierre Habouzit ··O madcoder@xxxxxxxxxx OOO http://www.madism.org
Attachment:
pgpB0QQiKpztC.pgp
Description: PGP signature