Sunday, October 13, 2013

Unshelve to a Different Branch in TFS

Love it or hate it, TFS has a lot of features; some are just more discoverable than others.

Team Foundation Server has the ability to unshelve between branches, but it requires Microsoft Team Foundation Server Power Tools to do so. Once you have installed these, simply follow these two steps to move a shelveset from one branch to another:

  1. Navigate to the root of your project.
  2. Fill in and execute the following command:

Unshelve Command:

tfpt unshelve "[ShelveSetName]" /migrate /source:"[SourcePath]" /target:"[TargetPath]"


cd c:/code/
tfpt unshelve "Demo Shelveset" /migrate /source:"$/DemoProject/branch" /target:"$/DemoProject/trunk"
Shout it



  1. Thanks for this, the example is the most useful one I've seen, keeps it short and to the point.

  2. It is worth noting that if you want to unshelve a shelveset from another TFS user, you need to append the shelvesetname with a semi-colon followed by the TFS username in all caps.

    For example:

    tfpt unshelve "[ShelveSetName][;TFSUSERNAME]" /migrate /source:"[SourceBranchPath]" /target:"[TargetBranchPath]"


Real Time Web Analytics