This project is read-only.


git tf clone http://myserver:8080/tfs/collectionName $/TeamProjectA/Main [--deep]

Initializes a new git repo from an existing path in a TFS server. When cloning from TFS, by default a shallow clone is performed, i.e. only the latest changeset is downloaded and used to create the first Git commit. The optional --deep flag may be used to clone each TFS changeset for the specified path into the new Git repo. Note, when using the --deep option, all future git tf fetch, git tf pull, and git tf checkin operations will default to --deep.

Last edited Aug 9, 2012 at 10:46 PM by mmitrik, version 1


trulsu Feb 20, 2017 at 11:01 AM 
To clone by specific changeset do:

>git-tf clone --version:201022 http://myserver:8080/tfs/collectionName $/TeamProjectA/myfolder/mybranch

Where 201022 is the changeset you want to clone from.

brenmartin Mar 11, 2014 at 2:08 PM 
Ok i didn't get what was said and even the documentation didn't help so here is my version of the same story hopefully someone shall benefit

1. Follow the initial steps as suggested in the documentation to install and set the path environment variable.

2. On command prompt cd into this folder and type the following command
git-tf clone <tfs-url> <tfs-collection>
an example is
git tf clone http://myserver:8080/tfs/collectionName $/TeamProjectA/ [--deep]
<tfs-collection> can be got from visual studio > team explorer by right clicking on the collection and choosing properties ( shown under server tab )

Note: By default the clone is done on the current folder you navigated to ( using cd <path>)

granadaCoder Nov 1, 2013 at 5:52 PM 
Is there a "by specific (tfs) changeset" option?

karrtikiyer Jul 15, 2013 at 12:12 PM 
Just to add if I have my branch within a folder under the project it works, like as for e.g the below command works:
git tf clone http://myserver:8080/tfs/collectionName $/TeamProjectA/myfolder/mybranch [--deep]

karrtikiyer Jul 15, 2013 at 12:10 PM 
Hi there, if I have a user-define branch directly under Project, how do I clone that? I am using the below command and it gives me an error that there is nothing to be cloned although there are files in the branch.
git tf clone http://myserver:8080/tfs/collectionName $/TeamProjectA/mybranch [--deep]