On this page:

Basics

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

With PyCharm, you can unshelve both entire shelves 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 PyCharm and apply them as shelved changes.

Unshelving changes from an entire shelf

  1. In the Shelf tab of the Version Control tool window, select the shelved changelist that you wast to unshelve.
  2. In the context menu of the selection, chooseUnshelve.
  3. In the Unshelve Changes to Changelist dialog box box that opens, specify the changelist you want to add the unshelved changes to. Select one of the existing changelists, or create a new one.
  4. If conflicts occur between the patched version and the current version, resolve them as described in Resolving Conflicts.
  5. Select the changes in both versions to be merged to the resulting file and click Apply.

Unshelving specific changes

  1. In the Shelf tab of the Version Control tool window, select the files or a whole shelf to unshelve.
  2. In the context menu of the selection, chooseUnshelve.
  3. In the Unshelve Changes dialog box box that opens, select the changes you want to unshelve.
  4. Specify the changelist to add the unshelved changes to. Select one of the existing changelists, or create a new one.
  5. If conflicts occur between the patched version and the current version, resolve them as described in Resolving Conflicts.
  6. 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 PyCharm 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.