I have dealt with a couple of clients recently who were very keen to get into the GIT repo’s that are available in TFS 2013. The unfortunate truth is that GIT is not the “same” as the widely used TFS Version Control (TFSVC), SVN, VSS source control systems. Some teams tend to have a problem with this and, after numerous missing changes/files and problems with branching, commit vs pushing and merging issues, will inevitably ask : “How do we go back to what we know?”.
There are tools to move from VSS & SVN to TFSVC and there are instructions to move from TFVC to GIT, but what about GIT to TFSVC? Well luckily, for a simple migration, you do not need any commercial or “3rd party” tools.
You do need to get your hand on GIT-TF and optionally the git client, and you are “a” for away.
1) Clone the repository
git clone http://<<servername>>:8080/tfs/<<Project collection>>/<<team project>>/_git/<<repo name>>
2) Replace the repository bindings
git remote rm origin
git tfs configure http://<<servername>>:8080/tfs/<<Project collection>> $/<<team project>>/<<destination folder path>>
3) Finally check in the changes
git tfs checking --deep
Remember the –deep parameter – this will replay the commits as check-ins in TFS
The only thing you should be aware of here is that the check-ins will happen in chronological order, but the time will reflect the time and date that the check-in is occurring and not when they were committed into the GIT repo.