如何在 TFVC 和 VS2017 Team Explorer 中使用 branches/workspaces?

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

我在 TFVC 下有一个现有解决方案需要重组,我认为这将是 branch/merge 的理想方案。

我现有的解决方案和项目在 \Main 中,并且映射到工作区 Data Warehouse。我将其分支到 \Restructure 并映射到一个新的工作区 Restructure,尽管当我尝试将其合并回来时,我收到一个错误,指出 Main 未映射到我的工作区中。

更改我的工作区以包含 Main 允许合并过程继续,但是当在团队资源管理器中查看时,我有重复的解决方案,除了显示路径的工具提示之外,没有视觉指示它们在哪个分支和看起来很容易弄错。

我不清楚我应该如何配置工作区以使用 branches/merges 以及 Visual Studio 2017 Team Explorer 如何代表工作区中的多个分支。

找到这个博客 post 回答了我的问题:

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!).