How to: Move a Shelveset to Another Branch?

How to: Move a Shelveset to Another Branch?

  • Comments 10

A very handy power tool is tfpt unshelve. It’s capable of migrating a shelveset from a branch to another, it does that by performing a baseless merge, so you will need to resolve the conflicts produced. The syntax of the command looks like the following:

tfpt unshelve shelvsetName /migrate /source:$/SourceBranch /target:$/TargetBranch

Leave a Comment
  • Please add 7 and 8 and type the answer here:
  • Post
  • PingBack from http://asp-net-hosting.simplynetdev.com/how-to-move-a-shelveset-to-another-branch/

  • Michael Ruminer on Here's The Deal When Your Code Compiles But At Runtime It Can't Find Some

  • Can you please give the options to unshelve from one workspace to another.

  • Murthay,

    Actually, the main motivation for shelve is to share changes between workspaces. You can shelve the changes in workspace A and unshelve them in workspace B.

  • tfpt /unshelve /migrate is a great feature.  However, during conflict resolution, I need to select "Resolve..." then "Migrate the Shelved Content" for every single item in my shelveset.  I see no way of migrating all shelved changes at once!  This becomes annoying when I am moving a shelveset of multiple files between branches.

    Is there a way to migrate all shelved changes at once without this manual conflict resolution?  If not, will the next release of TFPT allow one to migrate all shelved changes in batch so I don't have to click and migrate each file?

    Thanks,

    -Pat

  • Unfortunately there's no way to do so AFAIK. I'm not sure about the next version of TFPT but I can connect you with the TFS team if you send me an email via: http://blogs.msdn.com/mohamedg/contact.aspx

    Thanks,

    Mohamed

  • Hey dude, was looking for the same exact thing, and happy to see you posting it :)

  • Cool!

  • So here's something I don't understand that I'm thinking you can straighten me out on.  

    This is unshelving to another branch.  What if I just want the shelveset moved to another branch and not unshelved?

    Thanks!

  • Hey Stu, I'm sorry but I have moved to a different team and things could have changed a lot, here's the forum where you can ask TFS questions: social.msdn.microsoft.com/.../threads

Page 1 of 1 (10 items)