Why command get from a command line in TFS removes

2019-06-09 06:12发布

I have 2 projects A and B. They should remain in parallel directories. I created 2 labels, one for project A, the other one for project B.

I use tf get by label for project A and then tf get by label for another project B. For some reason tf get by label A deletes another project B and vise versa.

Checking out by Label from the Visual Studio Client looks fine – I can get both projects

标签: tfs
1条回答
ら.Afraid
2楼-- · 2019-06-09 06:33

If label A contains only project A, and label B contains only project B, then when you ask TFS to do a get of $/, then it will ensure that your workspace matches what you requested, up to and including deleting items that exist locally that aren't part of label A.

If you're seeing differences in Visual Studio, that's probably because you're selecting project A and performing a get on the label A and project B and performing a get on label B. This would mean that project A is at the changeset given by label A and project B is at the changeset given by project B.

On the other hand, when you perform a get of $/ at a label spec, then you will get only the label spec.

If you want to match the behavior of Visual Studio, you can do a get of project A and project B:

tf get $/ProjectA /version:LA
tf get $/ProjectB /version:LB
查看更多
登录 后发表回答