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

Re: Different behaviour of rebase -i

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Oct 10, 2008, 11:40 UTC
Message-ID
<alpine.DEB.1.00.0810101319150.22125@pacific.mpi-cbg.de.mpi-cbg.de>
In-Reply-To
<6beb92080810091204n6df4338fs3b182194a8d6454e@mail.gmail.com>
Hi,
On Thu, 9 Oct 2008, Leonardo Sobral Cunha wrote:
Show 11 quoted lines
> While doing a git rebase with my upstream branch ahead of my local 
> branch, first git rewinds my local branch to point to the upstream and 
> then prints "Nothing to do". As expected, my local branch ends pointing 
> to the upstream head.
> 
> But when I use the same command with the same branches using git rebase 
> -i, nothing happens and my local branch does not point to upstream (the 
> behaviour is different).
> 
> Is this different behaviour of rebase -i expected or is this a bug? This 
> is still happening in git version 1.6.0.2.443.g52e83

This is by design. You need to have a way to stop rebasing in the editor. For example when you realize that you passed the wrong upstream or something.

The most intuitive way (I thought) is to behave the same as "git commit": if you do not want to continue, just delete everything.

Now, I can see that it is unconvenient.

A workaround would be to add a line "bla" and when rebase complains about the unknown command, continue with "git rebase --skip".

Maybe we should add a new command "noop" which is automatically inserted when there is no other command?

Ciao, Dscho

Previous: Caio Marcelo de Oliveira FilhoNext: Johannes Schindelin
Message 3 of 4 in “Different behaviour of rebase -i”
  1. Leonardo Sobral CunhaOct 9, 2008
  2. Caio Marcelo de Oliveira FilhoOct 9, 2008
  3. Johannes SchindelinOct 10, 2008
  4. rebase -i: do not fail when there is no commit to cherry-pickJohannes Schindelin, Oct 10, 2008

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.