CLion 2016.2 Help

Unshelving Changes

On this page:

Basics

Unshelving is moving postponed changes from a shelf to a pending changelist.

With CLion, you can unshelve both entire shelved changelists and separate files.

Unshelved changes can be filtered out from the view or removed from the shelf. Once shelved, a change can be applied as many times as you need by unshelving and subsequently restoring it on the shelf.

You can also import patches created inside or outside CLion and apply them as shelved changes.

Unshelving changelists and files

  1. In the Shelf tab of the Version Control tool window, select the changes to unshelve:
    • To unshelve an entire changelist, just select its name.
      vcs_unshelve_entire_changelist
    • To unshelve the changes from a specific file, expand the relevant changelist node and select the desired file.
      vcs_unshelve_file
  2. On the context menu of the selection, choose Unshelve.
  3. In the Unshelve Changes Dialog that opens, specify the changelist you want to restore the unshelved changes to.
    • To add the changes to an existing changelist, choose Existing Changelist and select the relevant changelist from the drop-dow list.
    • To create a new changelist and restore the changes from the shelf in it, choose New Changelist.
      • In the Name text box, type the name of the changelist to be created.
      • In the Comment text box, type an optional description of the new changelist.
      • To have CLion automatically give the active status to the new change list immediately after the changes are restored in it, select the Make this changelist active check box. When this check box is cleared, the current active changelist remains active. See Changelist for details.
      • To have CLion preserve the context of the task associated with the new changelist on its deactivation and restore the context when the changelist becomes active, select the Track context: check box. See Managing Tasks and Context for details.
  4. To have CLion still display already unshelved changes in the Shelf tab so that you can apply them once more if necessary, clear the Remove successfully applied files from the shelf check box.

    When this check box is selected, the changes are not displayed in the Shelf tab after they are unshelved.

  5. Click OK to start the process.

    If conflicts occur between the patched version and the current version, resolve them as described in Resolving Conflicts. Select the changes in both versions to be merged to the resulting file and click Apply.

Applying external patches

You can also import patches created inside or outside CLion and apply them as shelved changes.

  1. In the Shelf tab of the Version Control tool window, choose Import Patches from the context menu.
  2. In the dialog box that opens, select the patch file to apply. The selected patch appears in the Shelf tab as a shelf.
  3. Select the newly added shelf with the patch and choose Unshelve Changes from the context menu of the selection.

See Also

Last modified: 22 November 2016