2
votes

I got a new computer and I have to move my TFS workspace. I found confusing info online, is this the correct approach?

  1. Add TF server in VS of new machine
  2. Copy folders from old machine to new machine (I have some files with pending changes)
  3. Update TF workspace in new machine using the command:

    tf workspaces /updateComputerName:oldCompName /s:"serverURL"

  4. In VS (new machine), map projects. Is this required?

2
Have you resolved the issue by below answers? Any update here?Andy Li-MSFT

2 Answers

0
votes

If you copied the entire workspace folders, then the map projects is not required, otherwise you have to map the projects (manage the workspace and map to the copied folder).

For example, if the original workspace is mapped to D:\Ad-workspace\2017\SCRUM-TFVC, then you have to copy the folders to the same path in the new machine.

Actually, you don't need to copy the workspace, just create a shelveset for the pending changes in the old machine, then connect to TFS from the new machine and map to a new workspace, then find the shelvset and unshelve, all the pending changes will be back to your new workspace.

enter image description here

0
votes

TFS workspaces are identified by the owner, the computer name and the workspace name. If your new computer has a new name, you need to update your existing TFS workspaces to reflect that change.

Your process is correctly and the last step is required. After establish the mapping, you may get a promote message:

Newly mapped items will not be download, until you execute a get...

You could perform a get. Then copy your back-up files/folders which copied from main branch to the new dev branch. Windows system will judge to replace files and add new files.(It may take some time) After this, TFS system will auto detect the changes in local and will list them as new pending changes.

Everything get back to the same as you work in old machine.