Cloud Developer's Technology Encounters

Mirror TFS to GIT with History

by polfilm on July 13, 2013

First Download Git-TF for VS TFS 2012

mkdir TFS
cd TFS
git-tf clone --bare --deep $/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

Leave a Reply