When using TFVC, you'll find shelvesets very useful. Shelvesets allow you to effectively back up your local copy of the changes on to the server. Developers are multitasking almost all the time; you may start coding a change in one branch and then realize that the change actually needs to be applied in another branch. In this recipe, you'll learn how to shelve changes in one code branch and then migrate the changes over to another branch without checking in the changes into source control.
The FabrikamTFVC project has three branches, Dev, Main, and Prod, as illustrated in the following diagram. In this recipe, we'll create a shelveset shelvesetDev1
from the pending changes in the Dev branch and unshelve the pending changes over to the Prod branch without checking in the pending changes:
This recipe requires the use of the tfpt
command-line utility. This utility is installed with TFS Power Tools. If you don't have TFS...