删除TFS分支而不下载它

发布于 2024-10-17 10:45:23 字数 250 浏览 8 评论 0原文

我正在尝试通过以下命令删除尚未下载到我的工作区的分支。

tf delete /lock:checkout /recursive $/TfsServerName/TfsFolder/Branch

我收到以下错误消息:

在工作区的 $/TfsServerName/TfsFolder/Branch 中找不到匹配的项目。

有没有办法在不实际下载的情况下删除 TFS 分支?

I am trying to delete a branch that has not been downloaded into my workspace via following command.

tf delete /lock:checkout /recursive $/TfsServerName/TfsFolder/Branch

I get following error message:

No matching items found in $/TfsServerName/TfsFolder/Branch in your workspace.

Is there a way to delete a TFS branch without actually downloading it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

尤怨 2024-10-24 10:45:23

您可以使用“tf get”命令仅对文件夹进行非递归获取。我不知道当您没有该文件夹的本地副本时可以将其删除。

you can do a non-recurisve get of only the folder with the "tf get" command. I am not aware that you can delete it when you don't have a local copy of the folder.

幸福不弃 2024-10-24 10:45:23

确保分支上方的文件夹映射到文件系统,然后:

  1. 打开 Visual Studio 的“开发人员命令提示符”
  2. cd(更改目录)到分支上方的文件夹
  3. 并运行以下命令:

tf get .
tf delete /recursive branch-folder
tf checkin

这将执行非递归获取,将整个分支/文件夹标记为删除,然后提示您输入消息并签入更改。

应该与 VS2012-2015 和 VS2012-2015 一起使用TFS 2010 至今。还使用 Visual Studio Team Services 托管的 TFS 进行了测试(截至 2016 年 2 月 25 日)


使用 VS2012 / TFS server 2010,delete 命令需要 /recursive

Make sure the folder above the branch is mapped to the filesystem, then:

  1. Open up Visual Studio's "Developer Command Prompt"
  2. cd (change directory) into the folder above the branch
  3. and run the following:

tf get .
tf delete /recursive branch-folder
tf checkin

This will do a non-recursive get, mark the whole branch/folder for deletion, then prompt you to enter a message and check in the change.

Should work with VS2012-2015 & TFS 2010 to current. Also tested with Visual Studio Team Services hosted TFS (as of 25th Feb 2016)


With VS2012 / TFS server 2010, the delete command needs /recursive

天赋异禀 2024-10-24 10:45:23

在源代码管理资源管理器中,您可以获得分支的最新版本,然后在开始下载后立即取消它。这将取消分支的幽灵,允许您通过界面删除它。您还必须删除下载到本地工作空间的几个文件。这完全是一种黑客行为,但确实又快又简单。

In the Source Control Explorer you can get the latest version of a branch then cancel it as soon as it starts downloading. That will un-ghost the branch allowing you to delete it through the interface. You'll also have to delete the few files that were downloaded to your local work space. It's a total hack but it's really quick and easy.

π浅易 2024-10-24 10:45:23

源代码管理资源管理器中,如果您只需将分支映射到本地路径并单击“确定”,它将启用“删除下拉列表”。

In the Source Control Explorer, if you simply map the branch to a local path and hit OK, it will enable the "delete dropdown".

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文