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

Re: Rebasing multiple branches

From
LPLeonid Podolny <leonidp.lists@gmail.com>
Date
Dec 22, 2010, 14:54 UTC
Message-ID
<4D121136.6050906@gmail.com>
In-Reply-To
<20101222143654.GA4829@nibiru.local>
On 12/22/2010 04:36 PM, Enrico Weigelt wrote:
Show 21 quoted lines
> Why not this way ?
>
> git checkout D
> git rebase -p -i D~3 --onto C'
>
> (C' is the merged branch of A' and B').
>
>
> So:
>
> git checkout branch_A -b rebasing_A
> git rebase master			# rebase old A to master
> git checkout branch_B -b rebasing_B
> git rebase master			# rebase old B to master
> git checkout -b rebased_merge
> git merge rebasing_A			# we're on B', merge in A'
> git checkout branch_C
> git rebase -p -i C --onto rebased_merge # set D~3..D ontop of it
>
>
> cu

Ah, nice. I didn't notice the -p option. However, the man page advises against using -p and -i together.

Previous: Enrico WeigeltNext: Enrico Weigelt
Message 4 of 6 in “Rebasing multiple branches”
  1. Leonid PodolnyDec 21, 2010
  2. Johannes SixtDec 21, 2010
  3. Enrico WeigeltDec 22, 2010
  4. Leonid PodolnyDec 22, 2010
  5. Enrico WeigeltDec 30, 2010
  6. Thomas RastDec 31, 2010

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.