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

Re: Rebasing cascading topic trees

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 16, 2016, 23:44 UTC
Message-ID
<xmqq7f83ouqs.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CAM+g_Nsiu_qqapB+FvwJCBfwEYLTPdHg4DueQWHq4XDNXMCgpQ@mail.gmail.com>
Norbert Kiesel <nkiesel@gmail.com> writes:
Show 34 quoted lines
> 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.

Doesn't topic1@{1} point at "F" after the rebase of the topic1 finishes?

Previous: Norbert KieselNext: Norbert Kiesel
Message 2 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.