删除TFS分支而不下载它
我正在尝试通过以下命令删除尚未下载到我的工作区的分支。
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您可以使用“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.
确保分支上方的文件夹映射到文件系统,然后:
cd
(更改目录)到分支上方的文件夹这将执行非递归获取,将整个分支/文件夹标记为删除,然后提示您输入消息并签入更改。
应该与 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:
cd
(change directory) into the folder above the branchThis 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
在源代码管理资源管理器中,您可以获得分支的最新版本,然后在开始下载后立即取消它。这将取消分支的幽灵,允许您通过界面删除它。您还必须删除下载到本地工作空间的几个文件。这完全是一种黑客行为,但确实又快又简单。
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.
在
源代码管理资源管理器
中,如果您只需将分支映射到本地路径并单击“确定”,它将启用“删除下拉列表”。In the
Source Control Explorer
, if you simply map the branch to a local path and hit OK, it will enable the "delete dropdown".