I ran the command tfpt unshelve /migrate /source:$/Dev/MyBranch /target:$/Main
from the root project folder containing all branches, taking care to undo all pending changes—both included and excluded—in the source and target branches first. As expected I saw a dialog asking me to select a shelveset, then a rundown of files from the selected shelveset in my VS Developer Command Prompt:
edit: file1.js
edit: file2.js
add: file3.js
add: file4.js
add: file5.html
edit: file6.css
...
The strange thing was that the files merged back into my source branch (Dev\MyBranch) rather than into my target branch (Main). After a tfpt unshelve /undo
of the desired shelveset I tried switching the paths for the target and source branches, i.e. tfpt unshelve /migrate /source:$/Main /target:$/Dev/MyBranch
but it had the same result. I also tried running the command from \Dev\MyBranch and \Main instead of the root project folder but no matter what I did the shelveset always merged into the dev branch I originally shelved it from. I wasn't able to find any other cases of this issue by searching and I'm not sure what else to try.