Search code examples
tfsmigrationtfvc

TFS server migrated to new environment


we have a TFS server configured on a machine. Now the organization has moved the complete VM to their other location with a new IP assigned to that VM. It's a clone of that old VM and after its migration, we also pushed some code the old running TFS.

Now the query is that how can we configure Visual studio to point to the new server and how can we effectively push the new code committed on the old server meanwhile the migration was underway.

If we have the latest code on say, a certain machine, can we just add a new connection , remove the old one and check for any changes visual studio shows to be pushed to the new server ?

    our concern is only the code repository and nothing else (tasks, bugs etc.)

any help appreciated


Solution

  • When a TFS server is cloned, you should be able to update the connection to use the new URL. Existing workspaces will automatically be remapped.

    There is no easy way to push the missing checkins from one serves to another. Especially when they share the same server identity (since the Client object model assumes it's the same serves, in the same state and keeps swapping over the workspace state and caches).

    You can create a single new checkin with the new state though.

    1. Make sure you are connected to the new server. (Turn off old server if possible).
    2. Create a workspace matching the one you have locally. Make sure it's of the "Local Workspace" variety
    3. Get latest version
    4. Delete all the local files, but keep the $tf folder.
    5. Paste the most up-to-date copy of the code into your new workspace
    6. Resolve any renamed files from within Team Explorer. enter image description here
    7. Check in your changes.