Clone

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 9:46 PM by mmitrik, version 1

Comments

brenmartin Mar 11 at 1: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 4:52 PM 
Is there a "by specific (tfs) changeset" option?

karrtikiyer Jul 15, 2013 at 11:12 AM 
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 11:10 AM 
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]