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:
- Navigate to the root of your project.
- Fill in and execute the following command:
Unshelve Command:
tfpt unshelve "[ShelveSetName]" /migrate /source:"[SourcePath]" /target:"[TargetPath]"
Example:
cd c:/code/ tfpt unshelve "Demo Shelveset" /migrate /source:"$/DemoProject/branch" /target:"$/DemoProject/trunk"
Enjoy,
Tom
Thanks for this, the example is the most useful one I've seen, keeps it short and to the point.
ReplyDeleteIt 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.
ReplyDeleteFor example:
tfpt unshelve "[ShelveSetName][;TFSUSERNAME]" /migrate /source:"[SourceBranchPath]" /target:"[TargetBranchPath]"