Events
17 Mar, 21 - 21 Mar, 10
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Azure DevOps Services | Azure DevOps Server 2022 - Azure DevOps Server 2019
Visual Studio 2019 | Visual Studio 2022
For various reasons, sometimes you need to set aside some or all of your work that's in progress. Shelvesets in Team Foundation Version Control (TFVC) are useful when you want to stop work for:
In these scenarios and others, you can move your pending changes to a shelveset on the server and then clean your workspace. The shelveset saves your file revisions, comment, list of related work items, and check-in notes when you evaluate policies before shelving.
Category | Requirements |
---|---|
Permissions | Member of the Contributors group for your project. |
For more information, see Default TFVC permissions.
Note
Visual Studio My Work and Code Review features are available with the following editions:
From the My Work page in Team Explorer, you can save and restore your file changes and related work items. You can also restore the position of your open windows, breakpoints, and other important cues.
In Visual Studio, select View > Team Explorer.
In Team Explorer, select
Home, and then select My Work.
On the My Work page, expand Suspend, enter a description of the suspended work, and then select Suspend.
When you're ready, you can resume the work. On the My Work page, under Suspended Work, select the description of your work, and then select Resume.
Tip
In either Solution Explorer or Source Control Explorer, you can shelve a specific subset of the files that you're working with. Select them, open their context menu, and then select Shelve Pending Changes. The Pending Changes page appears, ready to shelve only the files that you selected.
In Team Explorer, select
Home, and then select Pending Changes.
On the Pending Changes page, make sure that the changes that you want to shelve are listed in the Included Changes section. You can drag files between Included Changes and Excluded Changes. From the keyboard, you can also open the context menu of an item, and then select Include or Exclude.
Expand Shelve.
Enter a name for the shelveset.
(Optional) Select either of the following options:
Preserve pending changes locally. By default, this option is selected. As a result, your pending changes aren't removed from your workspace. The comment and the list of related work items also aren't removed. If you want to clean your workspace to work on another task, clear this checkbox.
Evaluate policies and notes before shelving. When you select this option, all check-in policies are evaluated before the shelveset is created. For more information about check-in policies, see Set and enforce quality gates.
Select Shelve.
In Team Explorer, select
Home, and then select Pending Changes.
Expand Actions, and then select Find Shelvesets.
On the Find Shelvesets page, enter the name or alias of a project team member in the search box, and then select Enter.
Tip
If you don't know the name of the owner, you can enter * to list shelvesets for all users.
A list of shelvesets appears in the Results list. You can filter the results to reduce the size of the list.
After the Find Shelvesets page displays a list of shelvesets, as described in Find a shelveset, double-click a shelveset to view it. The Shelveset Details page appears.
To switch between the list and tree views, use the View Options menu.
To get detailed information about a change to a file, open its context menu, and then select Open, View History, or one of the Compare options.
To retrieve the changes in the shelveset into your workspace, select Unshelve Changes:
If there's a file change that you don't want to unshelve, open the context menu of the file, and then select Exclude.
If you want to delete the shelveset, clear the Preserve shelveset on server checkbox.
If you don't want to restore the work item list and check-in notes that are stored in the shelveset, clear the Restore work items and check-in notes checkbox.
Select Unshelve. If there are conflicts between changes in the shelveset and the file versions in your workspace, the system prompts you to resolve them.
To delete the shelveset, select Delete Shelveset.
Warning
Be sure you don't need any of the work that's stored in a shelveset before you delete it. There's no way to recover a deleted shelveset.
Tip
Events
17 Mar, 21 - 21 Mar, 10
Join the meetup series to build scalable AI solutions based on real-world use cases with fellow developers and experts.
Register nowTraining
Module
Explain how a source control system helps manage files - Training
Explain how a source control system helps manage files
Documentation
Roll back changesets - Azure Repos
Understand how to roll back changesets by using Visual Studio with Team Foundation Version Control (TFVC).
Shelve command (Team Foundation Version Control) - Azure Repos
Use the Team Foundation Version Control (TFVC) Shelve command to store a set of pending changes on the server without actually checking them in.
Shelvesets command (Team Foundation Version Control) - Azure Repos
Use the Team Foundation Version Control (TFVC) Shelvesets command to display information about a set of shelved changes.