Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I have a project that I've been working on for some time now and I just cannot make Git work for me. I've spent a day trying to recover lost code and I am done with Git.

Can anyone tell me how to move an existing project into TFVC? I have a Visual Studio Online account with a TFVC project all set up for this task, but I cannot figure out how to change the source control settings so that the project is no longer tied to Git.

I am currently developing on VS 2013.

Any help is greatly appreciated!

like image 439
user2900166 Avatar asked Sep 13 '14 18:09

user2900166


People also ask

How do I import a Visual Studio project into TFS?

In Visual Studio, on the Team menu, click Connect to Team Foundation Server. If you have already configured a connection to a TFS server, you can omit steps 4-7. In the Connection to Team Project dialog box, click Servers. In the Add/Remove Team Foundation Server dialog box, click Add.

Does TFS work with Git?

git-tfs provides a two-way bridge between a local Git repository and a TFS server. git-tfs allows you to do your local development in a Git repository, and still synchronize your work with a TFS server.

How do I clone a TFS repository in Visual Studio 2019?

In Visual Studio 2019 version 16.8 and laterOn the start window, select Clone a repository. In the Browse a repository section, select Azure DevOps. If you see a sign-in window, sign in to your account. In the Connect to a Project dialog box, choose the repo that you want to connect to, and then select Clone.


2 Answers

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.

like image 71
Horizon_Net Avatar answered Oct 11 '22 05:10

Horizon_Net


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.
like image 25
Some_Yahoo Avatar answered Oct 11 '22 04:10

Some_Yahoo