Jump to content

mergeing of grandchild branches


epeleg

Recommended Posts

Suppose I have a /main branch, and I then create /main/task100 as its child.

Now I want to fix also task101 which is dependent on task100 but I don't want to merge /main/task100 back to /main yet.

So I create /main/task100/task101 and for similar reasons I also create /main/task100/task102 & /main/task100/task103.

Now its time to merge everything back to /main.

Should I first merge /main/task100/task101..task103 back to /main/task100 and then merge /main/task100 to /main ?

or should I just merge /main/task100/task101..task103 directly back to /main ?

Thanks,

Eyal

Link to comment
Share on other sites

Hi Eyal,

you just need to merge the last branch (task103) which contains the changes of the parent branches.

If you just want to integrate the changes done in the "task103" branch and not the inherited content you just need to run a cherry pick of the branch.

Link to comment
Share on other sites

Hi Manu,

Merging /main/task100/task103 is not enough because id does not include /main/task100/task102 nor /main/task100/task101

Personally I like to merge back to the parent and not grandparent because this way I know that all my branches should essential end up with a merge,

but I was looking to know if there are other (dis)advantages to one of those two ways.

Eyal

Link to comment
Share on other sites

Sorry! I didn't read your post correctly, you are right, the 103 is not including the 102 and 101.

I also prefer to integrate branch per branch, just to have a refined Branch Explorer, more clear, more traceable if one of the parent branches is breaking something... First the 100 and then 103.

Obviously integrating the grandchild branches is another harmless strategy, but if a bug is introduced in the branch 100 and you only integrate the grandchild branch 103 into main you will not be immediately sure where the bug comes from, 103 or 100...

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...