This is very easily solvable in SVN, however in wold of TFS not so much.
After some Googling I found this:
Unshelve changes onto another location
It is a very good guide however it misses some vital steps.
- Create a shelve out of your pending changes.
- Open your pending changes.
- Click Shelve (make sure you tick all files you want to move across). Make note of shelve name.
- Now you will need to do a full backup of your code in form of another shelve set.
- This time create shelve but check all files.
- You will be required to revert all your changes on branch/trunk that you have just used to create shelve. (You can also create a physical folder copy if you really worried about loosing your changes).
Note: Without this step (ie. changes still pending on trunk) power tools wouldn't un-shelve to my new branch. - Open your pending changes.
- Select all files
- Right click and select Undo...
- Make sure that there are no pending changes.
- Create another branch based.
- Right click your current branch and select "Branching and Merging"
- Select "Branch"
- Name it accordingly.
- Follow guide on Unshelve changes onto another location to restore to newly created branch.
Great ! Great help! I was encountering “An item with the same key has already been added.” when running tfpt command. Now it solved by Undo pending changes for Trunk as well. Thanks
ReplyDeleteYeah had exactly the same problem!
ReplyDeleteThanks! I had exactly the same problem :)
ReplyDelete