In place code move – manually from TFS to TFS

Manually moving code between two TFS servers while leaving it in the same place can be a bit confusing. I was trying to guide somebody through the steps on Twitter recently and thought it might be better as a step by step reference guide, so here goes.

As a primer, if you’re not confident with workspaces and working folders, I recommend you take a look at Martin Woodward’s explanation of workspaces and his follow-up on working folders. These are both great articles and will give you a solid understanding of the way in which these concepts are used.

  • Unbind from your existing server. This is done via File -> Source Control -> Change Source Control and unbind those you want to moveUnbind Dialog
  • Remove the path mapping from your workspace by either removing the workspace itself, or just the path you want to move if the workspace is larger than what you want to move.
  • File -> Source Control -> WorkspacesWorkspaces Dialog
  • Remove the paths you don’t need mapped (or use the remove on the previous screen to remove the whole workspace)Edit Workspace Dialog
  • Change TFS servers to your target server via Team Explorer
  • Hit the Connect to a Team Project toolbar itemTeam Explorer
  • Either pick your new server from the drop down list, or map a new server.Change Server
  • Pick the team projects you’d like to see. If you’re using TFS 2010 as either of your servers you’ll need to pick a team project collection.
  • Map the path of the code you want to move into a workspace on the target server
    • File -> Source Control -> Workspaces
    • Either add a new workspace for the path, or add the path to an existing workspace
  • Use the File -> Source Control -> Add to Source Control to drop the code into the target server
  • Check In!

Hopefully this will allow you to move a solution about a little more seamlessly. If you require more than a basic code move (work items or history for example), you should potentially look at other solutions such as a TFS to TFS synchronisation tool.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s