Search code examples
tfsgit-tf

Git repository and TFS repository


Once upon a time we had a TFS repository. We wanted to move to Git. At the time we took just the latest working version, copied that to a new git repo and started working on that.

However due to decommissioning of TFS we'd like to clone the TFS repo to Git (with git-tf) and rebase our changes on that.

Is this possible?


Solution

  • Assuming you are just talking about the source code (TFS is also a work item tracker, build server among other things)

    the --deep argument will clone all TFS changesets

    git tf clone <tfsurl> <teamproject> --deep
    

    update: bear in mind that this doesn't take into account linked work items, branches, tags.

    beware: this will take a while for large repositories...

    further reading: http://gittf.codeplex.com/wikipage?title=Clone&referringTitle=Home