Original chapter reference: Chapter 31: git-tfs. The command options and documentation recipes below are fully transcribed from Git Notes for Professionals.
Section 31.1: git-tfs clone
This will create a folder with the same name as the project, i.e. /My.Project.Name
$ git tfs clone http://tfs:8080/tfs/DefaultCollection/ $/My.Project.Name Section 31.2: git-tfs clone from bare git repository
Cloning from a git repository is ten times faster than cloning directly from TFVS and works well in a team environment. At least one team member will have to create the bare git repository by doing the regular git-tfs clone first. Then the new repository can be bootstrapped to work with TFVS.
$ git clone x:/fileshare/git/My.Project.Name.git
$ cd My.Project.Name
$ git tfs bootstrap
$ git tfs pull Section 31.3: git-tfs install via Chocolatey
The following assumes you will use kdiff3 for file diffing and although not essential it is a good idea.
C:\> choco install kdiff3 Git can be installed first so you can state any parameters you wish. Here all the Unix tools are also installed and 'NoAutoCrlf' means checkout as is, commit as is.
C:\> choco install git -params '"/GitAndUnixToolsOnPath /NoAutoCrlf"' This is all you really need to be able to install git-tfs via chocolatey.
C:\> choco install git-tfs Section 31.4: git-tfs Check In
Launch the Check In dialog for TFVS.
$ git tfs checkintool This will take all of your local commits and create a single check-in.
Section 31.5: git-tfs push
Push all local commits to the TFVS remote.
$ git tfs rcheckin Note: this will fail if Check-in Notes are required. These can be bypassed by adding git-tfs-force: rcheckin to the commit message.