Skip to content
KindDragon edited this page Sep 29, 2012 · 12 revisions

Summary

The clone command creates a new git repository, initialized from a TFS source tree

Synopsis

Usage: git-tfs clone [options] tfs-url-or-instance-name repository-path <git-repository-path>
  -h, -H, --help
  -V, --version
  -d, --debug                Show debug output about everything git-tfs does
  -i, --tfs-remote, --remote, --id=VALUE
                             The remote ID of the TFS to interact with
                               default: default
      --template=VALUE       Passed to git-init
      --shared[=VALUE]       Passed to git-init
      --ignore-regex=VALUE   a regex of files to ignore
      --no-metadata          leave out the 'git-tfs-id:' tag in commit
                               messages
                               Use this when you're exporting from TFS and
                               don't need to put data back into TFS.
  -u, --username=VALUE       TFS username
  -p, --password=VALUE       TFS password
      --all, --fetch-all
      --parents
      --authors=VALUE        Path to an Authors file to map TFS users to Git users

Examples

Simple

To clone all of $/Project1 from your TFS 2010 server tfs into a new directory Project1, do this:

git tfs clone http://tfs:8080/tfs/DefaultCollection $/Project1

Excludes

Let's say you want to clone $/Project, but you don't want to clone exes.

git tfs clone --ignore-regex=exe$ http://tfs:8080/tfs/DefaultCollection $/Project1

See also

Clone this wiki locally