删除TFS中的文件夹
我在工作区“CPortalWS”下的 TFS 项目中创建了一个文件夹。我删除了工作区,但现在我想删除项目中的文件夹,但删除选项不可用。
我尝试创建一个映射到该项目的新工作区,但仍然没有删除的选项。
这是 TFS 中的错误吗?我怎样才能删除该文件夹?
任何帮助将不胜感激。
I created a folder in a TFS Project under workspace "CPortalWS". I deleted the workspace, but now I would like to delete the folder in the project and the delete option is not available.
I've tried to create a new workspace mapped to the project but I still don't get the option to delete.
Is this a bug in TFS? How can I delete the folder?
Any help would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
删除 TFS 中的文件夹有点奇怪。
您必须:
创建工作空间
获取文件夹的最新源(到本地计算机)
在源代码管理器中,删除文件夹
签入您的更改(这是在源代码管理中删除文件夹的步骤)
Deleting a folder in TFS is a little strange.
You have to:
Create a Workspace
Get the latest source for the folder (to your local machine)
Inside Source Explorer, delete the folder
Check in your changes (this is the step that deletes the folder in Source Control)
请注意,删除并不是真正的删除。
文件夹/文件仍然存在并保存在版本控制中,例如用于取消删除场景。
如果您转到“工具 > 选项 > 源代码管理 > Visual Studio Team Foundation Server”并选中“在源代码管理资源管理器中显示已删除的项目”,然后右键单击其中一项,您就可以看到它们并使用取消删除功能。已删除的文件夹。
因此,如果您想要真正删除文件夹/文件实际上消失的地方,您需要使用只能从命令行使用的销毁命令,请参阅下面的链接
http://msdn.microsoft.com/en-us/library/bb386005.aspx
only note that delete is not an actual delete.
the folders/files are still there and kept in Version Control, for example for Undelete scenarios.
You can see them and avail the undelete function if you go to "Tools > Options > Source Control > Visual Studio Team Foundation Server" and check "Show deleted items in the Source Control Explorer" and then right-click on one of the deleted folders.
so, if you want real delete, where the folder/files actually go away you need to use the Destroy Command which is only available from the command line, see link below
http://msdn.microsoft.com/en-us/library/bb386005.aspx
当您在 TFS 中删除时,它不会将其从 TFS 中删除。即使您签入删除,它也会保留已删除文件的副本。这可能会导致一些问题。
要从 TFS 中永久删除,您需要发出
tfs destroy
命令。为此:
tf destroy $/SourceLocation/Folder
。其中 $/SourceLocation/Folder 是 TFS 中已删除文件夹的源位置。请注意:此命令还将从磁盘中删除文件。
When you delete in TFS, it does not remove it from TFS. It maintains a copy of the deleted files, even when you check in the deletion. This can cause some issues.
To permanently delete from TFS, you need to issue a
tfs destroy
command.To do this:
tf destroy $/SourceLocation/Folder
. Where $/SourceLocation/Folder is the Source location of the deleted folder in TFS.Please note: This command will also delete the file(s) from disk.
我遇到了类似的问题,其中有 1 个文件夹,尽管已从硬盘驱动器中删除,但仍显示在源代码管理中(文件夹旁有一个绿色 +)。它还向我显示了内容,但如果我尝试打开任何内容,则会出现一条错误消息,告诉我该文件不存在。
单击任何文件夹都不会显示删除按钮。然后我意识到选择一个文件就可以了!如果您没有文件,请创建一个文本文件并将其添加到您要删除的文件夹中(通过源代码管理)。单击该文件,注意删除显示。选择一个文件夹,请注意删除仅在半秒后消失。这个小延迟实际上是有用的。
我单击了该文件,因此启用了删除按钮,并将鼠标悬停在删除按钮上方。使用键盘,我执行了 CTRL + A,选择所有文件和文件夹后,我单击鼠标左键。它成功了!所有内容都被删除,包括(这是奇怪的事情)父文件夹。
I had a similar issue, where I had 1 folder which despite being deleted from Hard drive, was still showing as in Source Control (with a green + by the folder). It also showed me the content but if I tried to open any, an error message informed me the file wasn't there.
Clicking on any folder didn't show the delete button. I then realised that selecting a file did! If you don't have a file, create a text file and add it to the folder you want to delete (via Source Control). Click this file, note the delete shows. Select a folder and note that the delete disappears but only after half a second. This small delay is actually usable.
I clicked the file, so the delete button is enabled and hovered the mouse above the delete button. Using the keyboard, I did a CTRL + A and as soon as all files and folders were selected I clicked left mouse button. And it worked! Everything was removed, including (and this is the odd thing) the parent folder.
创建工作空间;并获取基本文件夹的最新信息;不要忘记隐藏相关文件夹。如果您要删除子文件夹,请隐藏所有子文件夹并获取基本文件夹的最新信息。因此,您可以节省大量提取文件的时间。
Create a Workspace; and get latest on the base folder; Dont forget to cloak the relevant folders. If you are going to delete the subfolders then cloak all and get latest on the base folder. So you save a lot of time in pulling files.