Mirror TFS to GIT with History

By polfilm,

  Filed under: GIT, Team Foundation Server 2012
  Comments: None

First Download Git-TF for VS TFS 2012

mkdir TFS
cd TFS
git-tf clone --bare --deep http://192.168.1.xxx:8080/tfs/CollectionName/ $/ProjectSourceName01
mkdir ProjectSourceName01Tmp
git clone --bare ProjectSourceName01 ProjectSourceName01Tmp
cd ProjectSourceName01Tmp
git push --mirror ssh://git@192.168.1.yyy/ProjectSourceName01.git

Then to clone back and double check it works

mv ProjectSourceName01 old-ProjectSourceName01
mv ProjectSourceName01Tmp old-ProjectSourceName01
git clone ssh://git@192.168.1.yyy/ProjectSourceName01.git

Be the first to write a comment.

Your feedback

You must be logged in to post a comment.