You can easily migrate or move shelveset from one branch to another in TFS. I was working on one project and did a lot of changes (around in 7 files) in one branch (x), but later on i come to know that this branch is freezed and we have to use another branch for check-in.
So i made one shelve-set of my code changes and though to get that shelve in another branch (y) but that was my silly thinking.
Then i thought how can move this to another TFS branch & come to solution as below.
Please follow the below steps to move shelveset to a different branch in TFS:
- Download & install the extension “Microsoft Visual Studio Team Foundation Server 2015 Power Tools”.
2. Once installed, open the “VS2015 Command Prompt” as below from start menu and search for command prompt and select developer command promt for vs2015.
located at path : C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts
3. With the “Command Prompt” open. Access any TFS mapped folder.
4. Run the command -> tfpt unshelve /migrate /source:”$/ProjectName/Branch” /target:”$/ProjectName/Targetbranch” “My Shelveset name”
5. Once this is done a dialog box will appear and just follow options to the end.