Migrating a TFS Shelve Set from One Branch to Another

Had an interesting problem to deal with today. We have 2 branches Dev and Dev-WebFarm. User1 started to work on Web farm configurations in the Dev branch instead of the Dev-WebFarm branch. So he had several files checked out in the dev branch, but he could not check it in to the Dev branch for various reasons. So the option we came up with was that User1 could shelve the changes he made in the Dev branch, and I would then migrate his shelve set to the Dev-WebFram branch. The way I achieved this was I downloaded TFS power tools and executed the below command.

C:\TFS Projects\Project1\Dev>tfpt unshelve “ShelvesetName;User1” /migrate /source:$/DevTeam/Project1/Dev /target:$/DevTeam/Project1/Dev-WebFram

Few things keep in mind to get this command right.

1. Make sure you invoke tfpt.exe from one of the folder that is mapped to your tfs workspace.

2. When you are trying to Unshelve a shelve set for a different user use “ShelvesetName;UserName” instead of just the shelve set name

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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