50

Is it possible to migrate from TFS 2008 to Git, and still preserve all the history, etc? I've seen some references that talk about doing it through SVN, but that seems rather complicated, and complicates my mission to introduce Git at my job.

Henning
  • 655
  • 1
  • 6
  • 8

2 Answers2

61

There is a direct way its called git-tfs and it's up on github.

You just do a

  git tfs clone <tfs server> <tfs project>

I recommend getting the source and adding it to your path separately so that you can debug it for any strangeness, but the code is pretty easy to step through.

I had a file that was an msi that was 500 MB that the client stored in tfs, that wouldn't convert, took a few hours to narrow it down.

Shaul Behr
  • 36,951
  • 69
  • 249
  • 387
DevelopingChris
  • 39,797
  • 30
  • 87
  • 118
  • 2
    Binaries of git-tfs are available at [git-tfs.com](http://www.git-tfs.com) or via [chocolatey](http://chocolatey.org/) as `cinst GitTfs`. – Simon Opelt Jun 20 '13 at 08:10
  • 14
    Be aware that this command won't manage tfs branches. If you want to clone branches too, use the option --with-branches but, for the moment, it doesn't support all cases (I know, that's me that develop it!). An improvement is in the pipe but need more work (and some very complex tfs repositories won't even be supported). So don't fit all needs! :( – Philippe Aug 03 '13 at 11:33
3

I wrote blog on migration of source code from TFS to Git, by maintaining your check-in history. Hope it will help:

Blog: TFS to GIT Migration

Prasad Telkikar
  • 15,207
  • 5
  • 21
  • 44