为什么我的 Trunk 分支没有显示 [Trunk] 图标?

Why is the [Trunk] icon not displayed for my Trunk branch?

在 TFS 中,当我创建一个新文件夹结构并将一个新文件夹添加到名为 "Trunk" 的根文件夹时。 TFS 中的其他解决方案会在该文件夹旁边显示一个 [Trunk] 图标,如下所示

但是我的 [Trunk] 分支旁边只有一个 [Folder] 图标。为什么?

你需要告诉 TFS 它是一个分支,而不是一个文件夹

右键单击要转换的文件夹,单击'Branching and Merging',选择转换为分支。 Tfs 现在会将文件夹视为一个分支

这是来自 TFS13,我假设 15 是相同的

在 TFS 中,我们无法直接在解决方案资源管理器中创建分支。你必须 convert a folder to a branch.

如果您已完成此操作但仍然无法显示分支图标。仔细检查是否遇到以下情况:

Important:

You cannot nest branches; therefore, you cannot convert any folder to a branch if it either contains a branch or is contained by a branch. For example, the following illustration shows how neither the parent nor the child of the FeatureTeamA branch can be converted to a branch.