Jump to content

cherry picking vs branch merge


Recommended Posts

suppose I have the following scenario:

Imagine a main branch with 7 change sets cs1 .. cs4

and a child branch that was created from cs1 , had two change sets within it ( cs5 & cs6)

and was then merged back to main (creating cs7).

now two more change sets are added to main (cs8 and cs9)

and one more change set to the child branch (cs10).

At this point I want to merge the additional changes made in cs10 into main [creating a new cs on main - cs11).

Should I do a cherry pick from cs10 ? or branch merge from the child branch ?

Will the results be different?

what would be the base change set for each of those scenarios ?

how would the answer to those two Q's change if not only cs10 was added to the child branch but cs11 as well?

Will I then need to cherry pick from both cs10 and cs11 (and does it matter in what order I do that?) or would doing a branch merge yield the desired results?

I would expect that in the first scenario the results would be the same but the merger would be simpler for a cherry pick because I would expect the base to be cs6 for a cherry pick and cs1 for a branch merge.

In the second scenario I would expect the best way to be to c.p. cs10 and then c.p. c211 because of simillar logic.

I am not sure at all what would happen if I try to c.p. only cs11. [what would be the base in the 3 way merge ?]



Link to comment
Share on other sites

  • 4 weeks later...

Hi psantosl.

That post is just great.

for some reason I was not able to post a comment there as well.

It was very enlightening and well written.

I love the merge explanation tool (which I only first saw 5 min ago).

And I love the Branch explorer graphic display.


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...