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

Re: rebasing trouble

From
JFJ. Bruce Fields <bfields@fieldses.org>
Date
Jun 29, 2006, 21:57 UTC
Message-ID
<20060629215725.GI14287@fieldses.org>
In-Reply-To
<20060629194723.GD14287@fieldses.org>
On Thu, Jun 29, 2006 at 03:47:23PM -0400, J. Bruce Fields wrote:
Show 12 quoted lines
> I must be missing something obvious:
> 
> bfields@puzzle:linux-2.6$ git checkout -b TMP nfs-client-stable^^^
> bfields@puzzle:linux-2.6$ git-describe
> v2.6.17-rc6-g28df955
> bfields@puzzle:linux-2.6$ git-rebase --onto v2.6.17 origin
> Nothing to do.
> bfields@puzzle:linux-2.6$ git-describe
> v2.6.17
> 
> So the git-rebase just reset TMP to v2.6.17.  But I know that nfs-client-stable
> isn't a subset of origin, so this doesn't make sense to me.

Oops, sorry, I lied; nfs-client-stable *is* a subset of origin, since Linus merged it.

But it *isn't* a subset of v2.6.17.

So the semantics of git-rebase just aren't quite what I expected. It first removes anything that isn't in the given upstream branch, *then* rebases to the commit given after --onto. Which may mean it throws out some stuff that is in the upstream branch even though it isn't yet included as of the given commit.

So what I really meant to do was just
	git-rebase v2.6.17

And rereading the man page, I see that git-rebase was working exactly as advertised. So I'm an idiot. In my defense, it is a little confusing: none of the examples in the man page that use --onto actually need it, and the "upstream" argument probably should be described as a commit or something instead of a branch.

(What is --onto actually useful for?)
--b.
Previous: J. Bruce FieldsNext: Junio C Hamano
Message 5 of 8 in “rebasing trouble”
  1. J. Bruce FieldsJun 29, 2006
  2. Junio C HamanoJun 29, 2006
  3. J. Bruce FieldsJun 29, 2006
  4. J. Bruce FieldsJun 29, 2006
  5. J. Bruce FieldsJun 29, 2006
  6. Junio C HamanoJun 29, 2006
  7. J. Bruce FieldsJun 29, 2006
  8. Junio C HamanoJun 30, 2006

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.