如何使用 TFS 映射现有文件夹(已移至新计算机),而无需从 TFS 下载整个数据?
早些时候,我已将本地文件夹映射到 TFS。由于某种原因我不得不更换机器/电脑。所以我将所有文件夹复制到新机器上。
现在,当我尝试将 TFS 文件夹映射到新计算机上的现有文件夹时,它总是在源代码管理资源管理器
最新
列下显示未下载
/代码>(VS 2010)。我可以获得最新版本,但这非常耗时。
有人可以建议一种在更短的时间内建立现有文件夹和 TFS 文件夹之间关系的方法吗?
Earlier I had mapped my local folders to the TFS. I had to change machine/computer for some reason. So I copied all the folders to the new machine.
Now when I try to map the TFS folders to the existing folders on the new machine, it always shows Not Downloaded
under the Latest
column of the Source Control Explorer
(VS 2010). I can get the latest version but it's very time consuming.
Can someone suggest a way to establish relationship between existing folders and the TFS folders in lesser time?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要的是在新计算机中拥有一个工作区,其中仅包含 TFS 中文件夹的映射。如果您只是将文件夹映射到工作区中,则当您执行 get 操作时,只会将文件夹中的文件下载到本地,而不是 TFS 中的整个版本控制树。由于您可以将文件夹从一台计算机复制到另一台计算机,因此再次从服务器下载它们不会花费更多时间。
在源代码管理资源管理器中,假设您使用默认工作区:
如果您只有几个文件夹,请右键单击每个文件夹并选择“映射到本地文件夹”,然后指定本地路径。
或者,您可以从(文件夹的)根文件夹进行映射,然后隐藏您不想下载的文件夹。打开工作区的下拉列表并选择“工作区”,然后选择编辑工作区,然后您可以添加并隐藏文件夹的映射,如下所示:
What you need is to have a workspace in your new machine that only has the mappings of your folders in TFS. If you just map your folders in your workspace, when you do a get, only files in your folders are downloaded locally, not the entire version control tree in TFS. Since you can copy your folders from one machine to another, downloading them from the server again shouldn't take more time than that.
From Source Control Explorer, let say you use the default workspace:
If you have jus a few folders, right click at each one and choose "Map to Local Folder", then specify the local path.
Alternatively, you can map from the root folder (of your folders), then cloak the ones that you don't want to download. Open the drop-down list of workspaces and choose "Workspaces", then choose to edit your workspace, then you can add and cloak the mappings of your folders like this: