Rebasing a merged branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 eventually came up with

  git rebase --onto master $(git rev-list topicA ^topicB | tail -1) topicB

but am thinking that it ought to be expressable in a simpler way?

--
\\// Peter - http://www.softwolves.pp.se/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]