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

interrupting "git rebase" (Re: git rebase +)

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Oct 14, 2011, 05:26 UTC
Message-ID
<20111014052653.GA5052@elie.hsd1.il.comcast.net>
In-Reply-To
<4E96E5E1.7010103@viscovery.net>
Johannes Sixt wrote:
> Hitting Ctrl-C during git-rebase results undefined behavior. git-rebase is
> a shell script and was never designed to operate in any form of atomicity.
>
> You should have let it run until it stopped.
Wait, really?  That's bad, and unlike most git commands.
> Then you could have said 'git
> rebase --abort' (if it didn't complete) or 'git reset --hard ORIG_HEAD'
> (if it completed).
If interrupting the rebase leaves the repository in a state that
	rm -fr .git/rebase-apply
	git reset --hard <appropriate commit name>
cannot recover from, I'd consider it a serious problem.

By the way, what happened to the "git rebase --abort-softly" synonym for "rm -fr .git/rebase-apply" discussed a while ago?

Previous: Johannes SixtNext: Jonathan Nieder
Message 3 of 7 in “git rebase +”
  1. Adam PiatyszekOct 13, 2011
  2. Johannes SixtOct 13, 2011
  3. interrupting "git rebase" (Re: git rebase +)Jonathan Nieder, Oct 14, 2011
  4. Jonathan NiederOct 14, 2011
  5. Martin von ZweigbergkOct 15, 2011
  6. Jonathan NiederOct 15, 2011
  7. Ramkumar RamachandraOct 17, 2011

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.