All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leonid Podolny <leonidp.lists@gmail.com>
To: git@vger.kernel.org
Subject: Rebasing multiple branches
Date: Tue, 21 Dec 2010 15:40:43 +0200	[thread overview]
Message-ID: <4D10AE5B.2080700@gmail.com> (raw)

Hi,
I need to rebase a rather complicated formation of branches.

My situation is like this (I hope ASCII graphics survive the sending):

         B--o--o--o--o--o--o  <--branch A
        /                   \
o--o--A--o--E  <--master    C--o--o--o--D  <--branch C
        \                   /
         C--o--o--o--o--o--o  <--branch B

I would like to rebase all three branches A, B and C onto commit E, and 
it's very important to keep the information about merges. For instance, 
if I take commit C and rebase it onto D, it serializes all the 
intermediate commits.
The only solution I managed to come up with is as follows:
- Take branch A and rebase it onto D (branch A').
- Same with branch B.
- Open a new branch C' from commit E.
- Merge A' and B' into C'.
- Manually cherry-pick all commits from commit C to commit D into branch C'.


The last step is way too ugly to be the only possible solution :)

             reply	other threads:[~2010-12-21 13:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-21 13:40 Leonid Podolny [this message]
2010-12-21 14:06 ` Rebasing multiple branches Johannes Sixt
2010-12-22 14:36   ` Enrico Weigelt
2010-12-22 14:54     ` Leonid Podolny
2010-12-30  5:35       ` Enrico Weigelt
2010-12-31 14:55         ` Thomas Rast

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D10AE5B.2080700@gmail.com \
    --to=leonidp.lists@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.