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

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

From
Orgad and Raizel Shaneh <orgads@gmail.com>
Date
Jul 17, 2012, 10:46 UTC
Message-ID
<CAGHpTBKn+avCrWegktoJRurG+oycq6Sb9CiRDCBQG=hSMUkjiA@mail.gmail.com>
Make a commit on top of master.
git rebase -i origin/master
Remove the commit.
Git prints "Nothing to do" and does not rebase.

Running 'git rebase -i' when there are no local commits has 'noop' in the first line, and with it the rebase is successful. Why is this 'noop' mandatory?

- Orgad
Next: Carlos Martín Nieto
Message 1 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.