git-tfs:如何克隆包含空格的 tfs 项目
我正在尝试使用 git-tfs 克隆 TFS 存储库。
它非常适合名称中没有空格的 TFS 项目,例如:
git tfs clone http://tfs:8080/ $/TeamProject/folder
但我也有一些项目/文件夹中同时包含空格和瑞典字符:
git tfs clone http://tfs:8080/ $/TeamProject/my swedish åäö folder1/folder2
当我运行命令时,我得到:
The item $/TeamProject/my swedish åäö folder1/folder2 does not exist at the spcified version.
任何建议如何解决这个问题吗?
I am trying to clone a TFS repository using git-tfs.
It works great with TFS projects that don´t have a space in the name, such as:
git tfs clone http://tfs:8080/ $/TeamProject/folder
But I also have some projects/folders that has both spaces and swedish characters in it:
git tfs clone http://tfs:8080/ $/TeamProject/my swedish åäö folder1/folder2
When I run the command I get:
The item $/TeamProject/my swedish åäö folder1/folder2 does not exist at the spcified version.
Any suggestion how to fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
以下是使用 git tfs 克隆 TFS (TFVC) 存储库的工作示例,其中 TFS (TFVC) 存储库包含空格:
git tfs clone http://tfs:8080/ $/"Team项目/文件夹名称”
使其工作的关键“技巧”是将双引号放在团队项目/文件夹名称周围(但不要将它们放在
$/
部分)。即
$/"团队项目/文件夹名称"
Here's a working example of cloning a TFS (TFVC) repository using
git tfs
where the TFS (TFVC) repository contains spaces:git tfs clone http://tfs:8080/ $/"Team Project/Folder Name"
The key "trick" to making it work is to put the double quotes around the team project / folder name (but don't put them around the
$/
part).i.e.
$/"Team Project/Folder Name"
我通过重命名 TFS 中的项目并删除瑞典字符解决了该问题。
正如 Polynomial 所说,如果用双引号将路径括起来,则可能会有包含空格的文件夹/项目。
I solved the problem by renaming the projects in TFS, and removed the swedish characters.
As Polynomial said, it is possible to have folders/projects that contains space if you enclose the path with double quotes.