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

Re: Recovering from an aborted git-rebase?

From
Steven Grimm <koreth@midwinter.com>
Date
Jan 10, 2007, 18:53 UTC
Message-ID
<45A5362B.3030204@midwinter.com>
In-Reply-To
<7v3b6jiv82.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
 > Doesn't "git rebase --abort" work for you at this point?

It probably would have, but he ran another "git rebase" immediately after hitting ctrl-C, not realizing that the interrupted one had left things in an odd state. I tried --abort after the fact and it said there was no rebase in progress; I assume the second rebase wiped out the temporary state from the first one.

However, all's well; Shawn's suggestion of using the reflog worked fine. We were able to reset back to HEAD@{3 hours ago} then do the rebase again, and it did the right thing. Even though we had a filesystem snapshot to fall back on, needless to say we were very happy to see there was a way to recover using nothing but git commands.

Hooray for the reflog being turned on by default!
-Steve
Previous: Junio C Hamano
Message 4 of 4 in “Recovering from an aborted git-rebase?”
  1. Steven GrimmJan 9, 2007
  2. Shawn O. PearceJan 9, 2007
  3. Junio C HamanoJan 10, 2007
  4. Steven GrimmJan 10, 2007

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.