user1086007
user1086007

Reputation: 21

How to work in TFS with one solution pointing different branches

I am using TFS. I created a branch for one of folder/project in my solution. Now I have two branches (folders) with the same code. But my solution pointed only one (parent folder-branch. But from now I want to work with newly create son folder-branch.

I found two ways:

  1. Redesign my solution to point newly created son folder-branch. My solution includes near 200 projects and this way will take a lot of job.

  2. Don't change solution but change workspace by clocking parent folder-branch and mapping newly created to old place. This way also very complicated.

May be somebody will give me advise to another way. Easy way of using the same solution for several branches.

Upvotes: 2

Views: 1780

Answers (2)

John Saunders
John Saunders

Reputation: 161821

I have been following the ALM Rangers' guidance on branching, using their "basic" branching structure:

  1. Created a "$/TP/Main" folder
  2. Converted it to a branch
  3. Created a "$/TP/Dev" folder
  4. Branched from Main into "$/TP/Dev/Dev"
  5. Created a "$/TP/Release" folder
  6. Branched from Main into "$/TP/Release/Release"

My normal workspace maps from "$/TP/Dev/Dev" to my local "C:\TP" folder. That's where I do my day to day work, and the solution files are under there. When I merge forward to Main, and then to Release, the solution naturally comes with it.

The solution doesn't refer to any branch. It contains references relative to the disk location, so it all works in any branch or any machine.

Upvotes: 2

Ryan Rinaldi
Ryan Rinaldi

Reputation: 4239

Typically you will want to branch and merge at the solution level, not the project level.

Upvotes: 2

Related Questions