git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Aborting git rebase --edit-todo

From
VTVictor Toni <victor.toni@gmail.com>
Date
Sep 3, 2020, 21:07 UTC
Message-ID
<CAG0OSgco0sRB=qXXfY2S2t_BdX9UpaOVxS3_VWyr5r6K+tjBOQ@mail.gmail.com>
In-Reply-To
<CAPUEspgScq1ay7KgSBmgAW_8SAymWpydQm5gAO9WiTumtu-e8w@mail.gmail.com>
On Do., 3. Sept. 2020 um 21:59 Uhr schrieb Carlo Arenas <carenas@gmail.com>:
Show 10 quoted lines
>
> On Thu, Sep 3, 2020 at 12:36 PM Victor Toni <victor.toni@gmail.com> 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
Previous: Carlo ArenasNext: Junio C Hamano
Message 8 of 14 in “Aborting git rebase --edit-todo”
  1. Victor ToniSep 3, 2020
  2. Junio C HamanoSep 3, 2020
  3. Carlo ArenasSep 3, 2020
  4. Victor ToniSep 3, 2020
  5. Junio C HamanoSep 3, 2020
  6. Victor ToniSep 3, 2020
  7. Carlo ArenasSep 3, 2020
  8. Victor ToniSep 3, 2020
  9. Junio C HamanoSep 3, 2020
  10. Victor ToniSep 3, 2020
  11. Johannes SchindelinSep 4, 2020
  12. Junio C HamanoSep 6, 2020
  13. Johannes SchindelinSep 4, 2020
  14. Johannes SchindelinSep 4, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.