|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
Walkthrough: Shelving Source Control Items
This walkthrough demonstrates using the shelving feature in Team Foundation source control.
Shelving lets you set aside a group of pending changes temporarily in order to work on another high priority release or to share your untested source file revisions with another user. The output of a shelve operation is a shelveset. For more information, see .
Before you can complete this walkthrough you must:
Specify a Team Foundation server. For more information about how to connect to a Team Foundation server, see.
Open an existing team project. For more information, see.
Add the project to source control and thereby create a local workspace in which to store, edit, and test your source-controlled files.
Create a Visual Studio solution and then perform a source control check-in on it. For more information, see.
If you are not familiar with these prerequisite steps, we recommend that you reviewfirst.
You must have the following security permissions to complete this walkthrough:
For more information about Team Foundation source control security permissions, see.
To complete this walkthrough, you must have the PendChange and Checkin permissions. For more information, see.
The following procedure, describes a shelve action which lets you set aside the pending changes in your workspace temporarily. A shelve action can also be used to share your code with another user for code review.
Perform a Get Latest operation to synchronize your workspace with the latest server version, and then build your application to make sure that it compiles before shelving or checking in. Doing this lets you incorporate changes to source files that have been made outside your workspace. For more information, see .
The following procedure assumes that you have a solution with pending changes.
To shelve folders and files in source control
In Solution Explorer, right-click, and select Shelve Pending Changes.
The shelve option is also available in Source Control Explorer.
In the Shelve - Source Files dialog box, type shelvetest in the Shelveset name box.
In the Comment box, type Testing my shelveset and then click Shelve.
The files and folders are copied to the source control server and are available for other team members to unshelve. For more information, see.