13

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?

Zeno
  • 581
  • 1
  • 7
  • 23

2 Answers2

17

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"

Tod Thomson
  • 4,773
  • 2
  • 33
  • 33
  • Your answer doesn't make sense. Can you remember (and add) the context? – jpaugh Sep 25 '17 at 19:49
  • How does it not make sense? The original question was "How do I clone a tfs project that contains spaces" and I've provided an example of how to clone a tfs project that contains spaces e.g. `$/"Team Project/Folder Name"`. – Tod Thomson Sep 28 '17 at 02:20
  • Your answer doesn't mention what's wrong, or even whether there is a way to fix it. (It is, in effect "Something about quotes.") This may seem nitpicky, but establishing *credibility* is just as important as having the right code there. – jpaugh Sep 28 '17 at 03:31
  • Much appreciated. – jpaugh Oct 05 '17 at 17:01
  • Awesome! Worked for me. – GET1NE Dec 13 '19 at 18:02
6

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.

Zeno
  • 581
  • 1
  • 7
  • 23
  • 1
    yes double quote should save you for space characters but the last version of git-tfs should now resolve your problem of swedish characters... – Philippe Dec 06 '12 at 21:20