git rebase command and docs questions

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

git rebase command and docs questions

From: Eugene Sajine <hidden>
Date: 2016-06-15 22:48:35

Hi,

I have few questions about rebase and its help content:

1. In case of this situation

o---o---o---o---o  master
        \
         o---o---o---o---o  next
                          \
                           o---o---o  topic


“git rebase master topic” says:
The current branch topic is up-to-date.

This message seems to be confusing and even incorrect.
The actual problem, as I understand, is that topic branch is not a
direct descendant of the master branch, therefore
“git rebase –onto master next topic” should be used instead.
Is there a way for git to identify this problem more correctly and
print more helpful error message?

2. The rebase help is a bit confusing in its “–onto” option part.
Initially help says that the form:

git rebase master topic

is a shorthand for git checkout topic, git rebase master

But, in “git rebase –onto master next topic” the meaning of the “next
topic” parameters is different: as I understand, it actually specifies
a range of commits from next to topic,  because –onto changes the way
the whole command is working, but it is not clarified in help. Is that
correct understanding?


3. The part of help from “Another example of --onto option is to
rebase part of a branch.” Is actually demonstrating absolutely the
same thing as the one before with the only difference that in the
second example the master has not advanced. There was probably some
different intention, but currently it looks like confusing
duplication.

Thanks,
Eugene

Re: git rebase command and docs questions

From: Sverre Rabbelier <hidden>
Date: 2016-06-15 22:48:35

Heya,

On Fri, Apr 9, 2010 at 20:49, Eugene Sajine [off-list ref] wrote:
But, in “git rebase –onto master next topic” the meaning of the “next
topic” parameters is different: as I understand, it actually specifies
a range of commits from next to topic,  because –onto changes the way
the whole command is working, but it is not clarified in help. Is that
correct understanding?
I've never been able to remember how rebase --onto works, perhaps if
we actually let users specify a range it would be more intuitive?

$ git rebase next..topic master

-- 
Cheers,

Sverre Rabbelier

Re: git rebase command and docs questions

From: Eugene Sajine <hidden>
Date: 2016-06-15 22:48:35

On Fri, Apr 9, 2010 at 4:37 PM, Sverre Rabbelier [off-list ref] wrote:
Heya,

On Fri, Apr 9, 2010 at 20:49, Eugene Sajine [off-list ref] wrote:
quoted
But, in “git rebase –onto master next topic” the meaning of the “next
topic” parameters is different: as I understand, it actually specifies
a range of commits from next to topic,  because –onto changes the way
the whole command is working, but it is not clarified in help. Is that
correct understanding?
I've never been able to remember how rebase --onto works, perhaps if
we actually let users specify a range it would be more intuitive?

$ git rebase next..topic master
I thought about it too. Even with the old syntax:

git rebase --onto master next..topic

at least as a second option the whole command would be much more
understandable for users. Currently, it fails with such range.

Thanks,
Eugene
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help