Cloning TFS repository using git-tfs
Asked Answered
A

1

9

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.

Araiza answered 10/1, 2018 at 22:3 Comment(1)
Team Foundation Server (TFS) is a platform that includes code hosting (both TFVC and Git). It's the on-premises version of VSTS. TFVC is Team Foundation Version Control, the centralized version control system that is available in TFS and TFVC. Despite the name, git-tfs is not necessary for git repositories hosted in TFS. It is only necessary for TFVC repositories. You just need to use git.Burt
S
17

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...

Switchman answered 10/1, 2018 at 23:27 Comment(1)
Yes, if one logs into the TFS web interface and navigates to the repo it will show a "clone" button. Clicking it shows a window where you can select protocol and it will tell you the correct urlPlexiglas

© 2022 - 2024 — McMap. All rights reserved.