Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to map existing folders (which are moved to new machine) with the TFS without need to download the entire data from TFS?

Earlier I had mapped my local folders to the TFS. I had to change machine/computer for some reason. So I copied all the folders to the new machine.

Now when I try to map the TFS folders to the existing folders on the new machine, it always shows Not Downloaded under the Latest column of the Source Control Explorer (VS 2010). I can get the latest version but it's very time consuming.

Can someone suggest a way to establish relationship between existing folders and the TFS folders in lesser time?

like image 657
Learner Avatar asked May 19 '11 07:05

Learner


People also ask

How do I connect an existing project to TFS?

In the Connect to Team Project dialog box, select the TFS instance you want to connect to, select the team project collection, select the team project you want to add to, and then click Connect. In the Team Explorer window, expand your team project, and then double-click Source Control.

How do I add files to TFS source control?

Right-Click If you have the Content Explorer, Project Organizer, Pending Changes window pane, or File List open, right-click the file you want to add and select Source Control > Add.

How do I remap a project in Visual Studio?

On the old TFS machine, open the Visual Studio Command Prompt (2010), and type the following command: tf workspaces the command will list all workspaces on the machine. tf workspaces /remove:* /collection:http://<servername>:8080/tfs/<collectionname> this command will remove the appropriate mappings.


1 Answers

What you need is to have a workspace in your new machine that only has the mappings of your folders in TFS. If you just map your folders in your workspace, when you do a get, only files in your folders are downloaded locally, not the entire version control tree in TFS. Since you can copy your folders from one machine to another, downloading them from the server again shouldn't take more time than that.

From Source Control Explorer, let say you use the default workspace:

  1. If you have jus a few folders, right click at each one and choose "Map to Local Folder", then specify the local path.

  2. Alternatively, you can map from the root folder (of your folders), then cloak the ones that you don't want to download. Open the drop-down list of workspaces and choose "Workspaces", then choose to edit your workspace, then you can add and cloak the mappings of your folders like this:

enter image description here

like image 96
Duat Le Avatar answered Oct 13 '22 04:10

Duat Le