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

Q: rebasing (moving) a whole tree (not just one branch)

From
DSDirk Süsserott <newsletter@dirk.my1.cc>
Date
Mar 18, 2011, 20:05 UTC
Message-ID
<4D83BB0A.8070307@dirk.my1.cc>
Hi,

I'd like to rebase a whole tree from A to B. Not just a single branch, but a whole tree. Let's say I have the following history:

--- A --- B
     |
     + -- C -- D
          |
          + E -- F
I'd like to rebase C and its descendants from A to B so it becomes:
--- A --- B
           |
           + -- C' -- D'
                |
                + E' -- F'
I know I can do it manually with

git rebase B C git rebase C D git rebase C E git rebase E F

Is there a way to just say "rebase C and all after that from A to B"?
Dirk
Next: Jonathan Nieder
Message 1 of 5 in “Q: rebasing (moving) a whole tree (not just one branch)”
  1. Dirk SüsserottMar 18, 2011
  2. Jonathan NiederMar 18, 2011
  3. Junio C HamanoMar 18, 2011
  4. Jonathan NiederMar 18, 2011
  5. Johannes SixtMar 18, 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.