我有这个例子,其中FolderA 有子FolderB,它们都是文件夹,直到我将FolderB 分支到FolderB-branch。然后两个子文件夹都变成了分支。
如何tf command
确定什么是文件夹,什么是分支?
tf dir /r
并tf dir /r /folders
显示相同的信息。
如何使用 tf 命令区分什么是什么?
TFS 11,Visual Studio 2012。
有一种方法可以做到这一点,使用tf branches
命令。使用它时,TFS 返回 2 个响应:
当 item 是Folder时:
Item FolderA is not used in any branch view
当 item 是Branch时,它会列出分支树,例如:
../FolderB
>> ../FolderB-branch
现在我们可以解析输出并指定 item 是 aFolder
还是 a Branch
。
当然,如果需要,该命令tf branches
需要在父文件夹中运行或使用 /collection 等完整参数运行。