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

Re: Can't get git rebase --onto to work

From
Howard Miller <howard@e-learndesign.co.uk>
Date
Jun 2, 2011, 11:28 UTC
Message-ID
<BANLkTimJQPvJ2oJh9BbcoZ-1ktSdAzTm2g@mail.gmail.com>
In-Reply-To
<20110602111825.GC4709@Imperial-SSD-Overlord>
> Can you please also point out which section of the doc caused you
> confusion?
>
>
Ok... this is exactly my situation (and solution)

"First let’s assume your topic is based on branch next. For example, a feature developed in topic depends on some functionality which is found in next.

    o---o---o---o---o  master
         \
          o---o---o---o---o  next
                           \
                            o---o---o  topic
We want to make topic forked from branch master; for example, because
the functionality on which topic depends was merged into the more
stable master branch. We want our tree to look like this:
    o---o---o---o---o  master
        |            \
        |             o'--o'--o'  topic
         \
          o---o---o---o---o  next
We can get this using the following command:
git rebase --onto master next topic"

However, I didn't look at the HEADs (seems stupid now). What I was aiming for was (simply) for 'master' to have the 'topic' branch changes (the delta between next and topic being applied to master if you will). The only outstanding step was to checkout master and merge topic (which will always bee fast-forward, of course).

It's the topic branch that gets rebased - obvious (now) but I interpreted it as the master branch getting modified (--onto master i.e. play the changes 'onto' master and modify master).

I didn't read it carefully enough - makes sense now.
Previous: Tim Guirgies
Message 10 of 10 in “Can't get git rebase --onto to work”
  1. Howard MillerJun 2, 2011
  2. Carlos Martín NietoJun 2, 2011
  3. Howard MillerJun 2, 2011
  4. Tim GuirgiesJun 2, 2011
  5. Howard MillerJun 2, 2011
  6. Tim GuirgiesJun 2, 2011
  7. Howard MillerJun 2, 2011
  8. DavidJun 2, 2011
  9. Tim GuirgiesJun 2, 2011
  10. Howard MillerJun 2, 2011

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.