How to move a project from Git to TFS in Visual Studio How to move a project from Git to TFS in Visual Studio git git

How to move a project from Git to TFS in Visual Studio


Just delete the .git folder (this one is normally hidden) in the root folder (f.e. via Windows Explorer). This deletes all things related to git. After that add the code to your TFS project and check it in into TFS.


Here's the procedure.

  1. Right click the project name in solution explorer.
  2. Open Folder in File Explorer.
  3. Close Visual Studio.
  4. Delete the folder and files that have .git in the name.
  5. Open Visual Studio and load the project.
  6. Tools->Options->Source Control.
  7. Pick TFS.
  8. Go to Team Explorer tab.
  9. Connect to your TFS server (I assume you have already created a repo)
  10. Pick the right repo.
  11. Right click solution in solution explorer Add to Source Control.


You cant just change from Git to TFVC as this option is bound to the Team Project. You will need to create a new Team Project making sure that you select TFVC as the provider.

  1. Connect to that new Team Project and create a local workspace.
  2. Create the folder structure you need. I would recommend $/newTP/MyPeoduct/Rx.x/
  3. Copy the files from the Git repo (except .git) to this location.
  4. Open the solution and right click on it and select "add to source control"

You should now be migrated...