Suspend your work and manage your shelvesets

For a variety of reasons, sometimes you need to set aside some or all of your work in progress. Shelvesets are useful when you want to stop work for:

  • Interruption: You have pending changes that are not ready for check in, but you need to work on a different task.

  • Collaboration: You have pending changes that are not ready for check in but you need to share them with another team member.

  • Code Review: You want another team member to perform a code review of your pending changes.

Suspend and resume your work from the My Work page

The My Work feature is available only in Visual Studio Premium and Visual Studio Ultimate.

From the My Work page you can save and then restore not only your file changes and related work items, but also the position of your open windows, breakpoints, and other important cues.

When you are ready to resume the work, go the Suspended & Shelved Work section of the My Work page, select a set of suspended work, and choose Resume.

To shelve your changes

  1. In the Pending Changes page, make sure that the changes you want to shelve are listed in the Included Changes section. You can drag files between Included Changes and Excluded Changes (Keyboard shortcut: open the context menu of an item, and then choose Include or Exclude.

  2. Choose the Shelve link.

  3. Type a name for the shelveset.

  4. (Optional) Select either of the following check boxes:

    • Preserve pending change locally

      By default, this check box is selected. When this check box is selected, your pending changes (including the comment and the Related Work Items list) are not removed from your workspace. If you want to clean your workspace to work on another task, you should clear this check box.

    • Evaluate Policies and check-in notes before shelving

      When you select this check box, all check-in policies are evaluated before the shelveset is created. For more information about check-in policies, see Set and Enforce Quality Gates.

  5. Choose the Shelve button.

Find a shelveset

To find a shelveset

  1. Choose the Actions link, and then choose Find Shelvesets.

  2. On the Find Shelvesets page, enter the name or alias of a project team member in the box, and then choose the Enter key.

    Tip

    If you don't know the name of the owner, you can type * to list shelvesets for all users.

  3. A list of shelvesets appears in the Results list. You can type a filter to reduce the size of the list.

View and work with a shelveset

After you have a list of shelvesets (explained in "To find a shelveset") in the Find Shelvesets page, double-click the shelveset to view it.

The Shelveset Details page appears.

  • You can toggle between list and tree view from the Actions menu.

  • To get more information about a change to a file, open its context menu, and then choose Open, View History, or one of the Compare options.

  • Choose Unshelve Changes if you want to retrieve the changes in the shelveset into your workspace:

    1. For any file changes that you do not want to unshelve, open the context menu of the file, and then choose Exclude.

    2. If you want to delete the shelveset, clear the Preserve shelveset on server check box.

    3. If you do not 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 check box.

    4. Choose the Unshelve button.

    If there are conflicts between changes in the shelveset and the file versions in your workspace, the system will prompt you to resolve them.

  • Choose Delete Shelveset if you want to delete the shelveset.

    Caution: Be sure you do not need any of the work stored in a shelveset before you delete it. There is no way to recover a deleted shelveset.

Last updated