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 Working with Source Control Shelvesets.
Prerequisites
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 How to: Connect to Team Foundation Server.
Open an existing team project. For more information, see Walkthrough: Joining a Team Project.
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 Adding Projects and Solutions to Source Control from Solution Explorer.
If you are not familiar with these prerequisite steps, we recommend that you review Walkthrough: Exploring Team Foundation Source Control first.
You must have the following security permissions to complete this walkthrough:
PendChange
Checkin
For more information about Team Foundation source control security permissions, seeOverview of Team Foundation Security.
Required Permissions
To complete this walkthrough, you must have the PendChange and Checkin permissions. For more information, see Source Control Security Rights and Permissions.
Shelve Folders and Files in Team Foundation Source Control
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 How to: Update the Source in your Workspace.
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.
Note
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 How to: Shelve and Unshelve Pending Changes.
See Also
Tasks
How to: Shelve and Unshelve Pending Changes
Reference
Shelvesets Command
Shelve Command
Unshelve Command
Concepts
Working with Source Control Shelvesets
Working with Source Control Workspaces