Thread (4 messages) flat view 4 messages, 3 authors, 2016-06-15

Re: Different behaviour of rebase -i

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:45:28

Hi,

On Thu, 9 Oct 2008, Leonardo Sobral Cunha wrote:
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help