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

Re: Rebasing multiple branches at once

From
Johannes Sixt <j6t@kdbg.org>
Date
Jan 1, 2017, 08:42 UTC
Message-ID
<3f29bd56-6f63-c035-71d3-9b2f2577b998@kdbg.org>
In-Reply-To
<20161231081433.3zo6lrsjsu2qho4u@glandium.org>
Am 31.12.2016 um 09:14 schrieb Mike Hommey:
Show 32 quoted lines
> Hi,
>
> I've had this kind of things to do more than once, and had to do it a
> lot today, so I figured it would be worth discussing whether git-rebase
> should be enhanced to support this, or if this should go in a separate
> tool or whatever.
>
> So here is what I'm trying to do in a not-too painful way:
>
> I'm starting with something like this:
> A---B---C---D---E
>             \---F
>
> where A is master, and E and F are two local topics with a common set of
> things on top of master.
>
> The next thing that happens is that master is updated, and I want to
> rebase both topics on top of the new master.
>
> So I now have:
>
> A---G
> \---B---C---D---E
>             \---F
>
> If I do the dumb thing, which is to do `git rebase master E` and `git
> rebase master F`, I end up with:
>
> A---G---B'---C'---D'---E'
>     \---B"---C"---D"---F'
>
> That is, I just lost the fast that E and F had common history.
Git garden shears, perhaps?
https://public-inbox.org/git/alpine.DEB.2.20.1609111027330.129229@virtualbox/
-- Hannes
Previous: Jeff King
Message 4 of 4 in “Rebasing multiple branches at once”
  1. Mike HommeyDec 31, 2016
  2. Junio C HamanoJan 1, 2017
  3. Jeff KingJan 2, 2017
  4. Johannes SixtJan 1, 2017

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.