Re: Rebasing a merged branch
- From
- Chris Frey <cdfrey@foursquare.net>
- Date
- Jul 10, 2010, 06:55 UTC
- Message-ID
- <20100710065541.GB15600@foursquare.net>
- 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:
Show 21 quoted lines
> 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