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

Re: Why can't git-rebase back up?

From
Junio C Hamano <junkio@cox.net>
Date
Feb 18, 2006, 09:15 UTC
Message-ID
<7vpsllowo2.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060218085608.30325.qmail@science.horizon.com>
linux@horizon.com writes:
Show 6 quoted lines
> That also lets you do something about the rebasing-a-merged-branch
> problem.  If you have:
>
>       g-->h-->i-->j topic
>      /       /
> a-->b-->c-->d-->e-->f master
Ideally, you should be able to come up with:
                        g'->h'->j' topic
                       /
  a-->b-->c-->d-->e-->f master

But it should not matter. You should not be merging master (or any other branches that might have interaction with the topic) into your topic branches to begin with.

Instead, use a separate test branch and merge both topic and master into it:

             g-->h-->j topic
            /         \       
           /---o---o---o test
          /       / 
     a-->b-->c-->d-->e-->f master

Once your topic is fully cooked, you would merge it into master. If the area topic and master touch overlaps, you might have to resolve the same conflict you would have already resolved when you merged (j) commit into test in the above picture, but that is why we have "git rerere" ;-).

BTW, why are we suddenly having many nameless people on this list, I wonder...

Previous: linux@horizon.comNext: linux@horizon.com
Message 8 of 10 in “Why can't git-rebase back up?”
  1. linux@horizon.comFeb 17, 2006
  2. Andreas EricssonFeb 17, 2006
  3. linux@horizon.comFeb 17, 2006
  4. Andreas EricssonFeb 17, 2006
  5. Junio C HamanoFeb 18, 2006
  6. Junio C HamanoFeb 18, 2006
  7. linux@horizon.comFeb 18, 2006
  8. Junio C HamanoFeb 18, 2006
  9. linux@horizon.comFeb 18, 2006
  10. Johannes SchindelinFeb 18, 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.