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

Re: git rebase -i does not rebase if all lines are removed

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Jul 17, 2012, 12:25 UTC
Message-ID
<500559AB.9000304@viscovery.net>
In-Reply-To
<1342522535.20671.7.camel@centaur.cmartin.tk>
Am 7/17/2012 12:55, schrieb Carlos Martín Nieto:
> But more important would be /why/ you feel that rebase -i is the tool
> you should be using. If you'd like to move the branch pointer back,
> that's what the reset command is for.
Perhaps because that's not what the OP wanted to do?

Sometimes it happens that you rebase a bunch of commits, and only a handful remains because the others are already in upstream. Looking at each remaining one closely, you decide that they don't have to be rebased (maybe because slightly modified versions are in upstream), so you remove them one by one, and you end up with an empty list.

This has happened to me at one point, and writing "noop" after the list is empty is a minor nuisance. But I am not complaining. Because being able to abort an interactive rebase by clearing the list is much more important.

-- Hannes
Previous: Carlos Martín Nieto
Message 3 of 3 in “git rebase -i does not rebase if all lines are removed”
  1. Orgad and Raizel ShanehJul 17, 2012
  2. Carlos Martín NietoJul 17, 2012
  3. Johannes SixtJul 17, 2012

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.