简体   繁体   English

git-tfs:如何克隆包含空格的tfs项目

[英]git-tfs: How do I clone a tfs project that contains spaces

I am trying to clone a TFS repository using git-tfs. 我正在尝试使用git-tfs克隆TFS存储库。

It works great with TFS projects that don´t have a space in the name, such as: 它与名称中没有空格的TFS项目配合使用非常好,例如:

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? 任何建议如何解决这个问题?

Here's a working example of cloning a TFS (TFVC) repository using git tfs where the TFS (TFVC) repository contains spaces: 这是一个使用git tfs克隆TFS(TFVC)存储库的工作示例,其中TFS(TFVC)存储库包含空格:

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). 使其起作用的关键“诀窍”是在团队项目/文件夹名称两边加上双引号(但不要在$/部分两边加上双引号)。

ie $/"Team Project/Folder Name" $/"Team Project/Folder Name"

I solved the problem by renaming the projects in TFS, and removed the swedish characters. 我通过在TFS中重命名项目解决了该问题,并删除了瑞典字符。

As Polynomial said, it is possible to have folders/projects that contains space if you enclose the path with double quotes. 正如Polynomial所说,如果用双引号将路径引起来,则文件夹/项目中可能包含空格。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM