I am currently involved in moving some TFS TFVC hosted source to a TFS Git repository. The first step was to clone the source for a team project from TFS using the command
git tf clone --deep http://tfsserver01:8080/tfs/defaultcollection ‘$My Project’ localrepo1
and it worked fine. However the next project I tried to move had no space in the source path
git tf clone --deep http://tfsserver01:8080/tfs/defaultcollection ‘$MyProject’ localrepo2
This gave the error
git-tf: A server path must be absolute.
Turns out if the problem was the single quotes. Remove these and the command worked as expected
git tf clone --deep http://tfsserver01:8080/tfs/defaultcollection $MyProject localrepo2
Seems you should only use the quotes when there are spaces in a path name.
Updated 11 June – After a bit more thought I think I have tracked down the true cause. It is not actually the single quote, but the fact the command line had been cut and pasted from Word. This mean the quote was a ‘ not a ‘. Cutting and pasting from Word can always lead to similar problems, but it is still a strange error message, I would have expected an invalid character message