Cloning TFS repository using git-tfs

David Yang picture David Yang · Jan 10, 2018 · Viewed 11.5k times · Source

I'm trying to clone a GIT repository in TFS using git-tfs using TFS 2013

git tfs clone http://servername:8080/tfs/DCM "$/Python"

Gives me:

error: the path $/Python you want to clone doesn't exist!

"DCM" is the name of the collection and "Python" is the name of the project:

enter image description here

I try to list the branches:

git tfs list-remote-branches http://servername:8080/tfs/DCM

which yields:

No TFS branches were found!

My instinct is that this is a syntax error, but not sure what I'm doing wrong.

Answer

Philippe picture Philippe · Jan 11, 2018

As the main developer of "git-tfs", I'm very pleased you absolutely want to use it! But there is no need of it here ;-)

The repository you want to clone is already a git repository (see the small red git icon like the one in the git website).

git-tfs is a bridge tool to be able to import a TFVC history in a local git repository.

So, you just need to do a pure git clone, that should be something like :

 git clone http://servername:8080/tfs/DCM/Python.git

The URL is provided by the web portal, at the exact page you are, in the upper right corner. You should have a 'clone' button...