git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Chris Frey <cdfrey@foursquare.net>
To: Peter Krefting <peter@softwolves.pp.se>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Rebasing a merged branch
Date: Sat, 10 Jul 2010 02:55:41 -0400	[thread overview]
Message-ID: <20100710065541.GB15600@foursquare.net> (raw)
In-Reply-To: <alpine.DEB.2.00.1007081247410.18908@ds9.cixit.se>

On Thu, Jul 08, 2010 at 12:52:08PM +0100, Peter Krefting wrote:
> Hi!
> 
> If I slightly modify the example from the git-rebase manual page to look 
> like this:
> 
>   o---o---o---o  master
>          \
>           o---o---o---o---o  topicA
>            \     /
>             A---B---C---D  topicB
> 
> (topicA has merged "B" into its history; its first-parent from the line of 
> "o"s).
> 
> If I now do a "git rebase --onto master topicA topicB", I only get commit C 
> and D, as it sees A and B as being part of both branches.
> 
> Is there a way to make git rebase pick up A, B, C and D (and only them)?
> 
> I.e., I would like "all commits on topicB which are not in topicA's 
> --first-parent history".


I'm no expert on rebase --onto, but aren't you trying to rebase so that
the tree looks like this afterward?


   o---o---o---o  master
            \   \
             \   A---B---C---D  topicB
              \
               o---o---o---o---o  topicA
                \     /
                 A---B
 
In which case, won't this work?

	git checkout topicB
	git rebase master

- Chris

  reply	other threads:[~2010-07-10  6:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-08 11:52 Rebasing a merged branch Peter Krefting
2010-07-10  6:55 ` Chris Frey [this message]
2010-07-10  7:19   ` Peter Baumann

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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20100710065541.GB15600@foursquare.net \
    --to=cdfrey@foursquare.net \
    --cc=git@vger.kernel.org \
    --cc=peter@softwolves.pp.se \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).