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

Rebasing cascading topic trees

From
NKNorbert Kiesel <nkiesel@gmail.com>
Date
Nov 16, 2016, 23:39 UTC
Message-ID
<CAM+g_Nsiu_qqapB+FvwJCBfwEYLTPdHg4DueQWHq4XDNXMCgpQ@mail.gmail.com>

I currently have a situation with cascading topic branches that I need to rebase regularly. In the picture below, I want to rebase the tree starting with `E` to be rebased onto master (my actually cascade is 4 branches deep).

A--B--C--D (master)
   \
    E--F (topic1)
       \
        G--H (topic2)
After running `git rebase --onto master master topic1`, I end up with
A--B--C--D (master)
   |     \
   \      E'--F' (topic1)
    E--F
       \
        G--H (topic2)

I then need to also run `git rebase --onto topic1 F topic2` to arrive at the desired

A--B--C--D (master)
   |     \
   \      E'--F' (topic1)
    E--F      \
       |       G'--H' (topic2)
       \
        G--H

Problem here is that I don't have a nice symbolic name for `F` anymore after the first rebase. Rebasing `topic2` first is not really possible, because I do not have a new graft-point yet. I currently write down `F` ahead of time (or use `reflog` if I forgot) `F`, but I wonder if there is a better solution.

Next: Junio C Hamano
Message 1 of 5 in “Rebasing cascading topic trees”
  1. Norbert KieselNov 16, 2016
  2. Junio C HamanoNov 16, 2016
  3. Norbert KieselNov 17, 2016
  4. Jeff KingNov 17, 2016
  5. Norbert KieselNov 17, 2016

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.