mhep
mhep

Reputation: 2139

How do I work with branches/workspaces in TFVC and VS2017 Team Explorer?

I have an existing solution under TFVC which needed restructuring and figured this would be an ideal scenario for branch/merge.

My existing solution and projects are in \Main and this is mapped to a workspace Data Warehouse. I branched this to \Restructure and mapped to a new workspace Restructure though when I tried to merge this back I received an error that Main wasn't mapped in my workspace.

Changing my workspace to include Main allows the merge process to continue but when looking in Team Explorer I have duplicate solutions and other than the tooltip showing the path there is no visual indication what branch they are in and it looks to be very easy to work on the wrong one.

I'm not clear on how I should be configuring workspaces to work with branches/merges and how Visual Studio 2017 Team Explorer represents multiple branches in a workspace.

Upvotes: 1

Views: 1084

Answers (1)

mhep
mhep

Reputation: 2139

Found this blog post answered my question:

https://blogs.msdn.microsoft.com/phkelley/2013/05/30/using-multiple-workspaces-with-visual-studio/

Performing integrations

Some customers have mentioned that the reason they map all their branches in the same workspace is to perform integrations (merges) from branch to branch. You can still merge when using multiple workspaces described above. You always want to be performing the merge in the target branch – if I’m integrating from Development to Main, then the workspace selected should be PHKELLEY-DEV_Main, since that’s where changes are being pended and that’s the branch to be modified with a check-in. The source branch doesn’t have to be mapped in the same workspace (or mapped at all!).

Upvotes: 1

Related Questions