From: Victor Toni Date: Thu, 03 Sep 2020 21:07:38 GMT Subject: Re: Aborting git rebase --edit-todo Message-ID: In-Reply-To: On Do., 3. Sept. 2020 um 21:59 Uhr schrieb Carlo Arenas : > > On Thu, Sep 3, 2020 at 12:36 PM Victor Toni wrote: > > > > is more difficult to recover from. (I'm still thankful for `.git/logs/HEAD`) > > another command that might not be that well known and that will always > recover from a botched merge (or a rebase in this case) : > > $ git reset --hard ORIG_HEAD > I tried it on a backup copy of my repository (created directly after the "incident"). Unfortunately it would have missed two commits. > PS. `git reflog` might be also interesting; sorry if going slightly off topic Thanks for that. Never used it before. git reflog would have helped directly since it shows the last real commit I did before messing things up. From there it's a walk in the park. Victor