Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Branching specific projects from a multi project solution

Tags:

tfs

I have a multi-project solution in TFS. One of the projects holds common code that is referenced by all the projects in the solution. I now want to update only one of the projects so I thought I would branch one of the projects into a development branch.

It now complains about the common code project reference which is to be expected but I'm wondering how to handle this scenario. Do I just take a branch from the main solution and delete the projects I do not need and then merge back when complete or do I just leave the other projects as-is in the new branch and let TFS handle them when I merge back? How can I handle this?

I'm pretty new to TFS so any help is appreciated.

like image 307
Richard Banks Avatar asked Oct 21 '22 16:10

Richard Banks


1 Answers

A "Main" branch should usually contain one product plus any 3rd Party dependencies. This situation may differ if we are talking millions of lines of code, but in a small-medium application, putting all your code into a branch makes sense.

So now you should just branch Main to "FeatureX". TFS (as with most modern VC solutions) will not do a full "copy" of the files, just record an entry that a branch was created from a Changeset.

So in your case...

Just create a branch, make the changes to your project (Forward Merge Main into your branch as you go to keep the 2 in sync) and then Reverse Integrate merge the branch back into your "Main" and delete it once you're done.

like image 144
DaveShaw Avatar answered Oct 25 '22 20:10

DaveShaw