Restoring deleted files or folders

If you delete files or folders from your sandbox and deliver the changes, you can restore the deleted files or folders by finding and reversing the change sets that deleted them.

About this task

Deleting a file or folder from a project removes it from its containing folder but does not remove it from the repository. You can restore the deleted file or folder, and its history, by finding the change set that deleted it, and then reversing that change set to create a patch that includes the deleted file or folder. Merge the file or folder from the patch into your sandbox to restore it to your sandbox.

Note: If you deleted a file version by clicking Delete Content in the Check-in History pane, you cannot restore the file version from the repository.

Procedure

  1. Search for the change set: Click Search > Jazz Source Control, and then select Change sets.
  2. In the Search for Change sets window, enter information about the deleted file or folder:
    1. In the Name begins with field, type the name of the deleted file or folder.
    2. In the Modifies field, type the name of the component from which the file or folder was deleted.
    3. Optional: In the Creator field, type the name of the user who deleted the file or folder.
    4. If you have other information that can identify the change set, enter it in the appropriate field.
  3. In the Search view, right-click the change set that deleted the file and click Reverse. A set of patches is created that reverses the changes in that change set. For more information, see Reversing change sets.
  4. In the Pending Changes view, expand the Pending patches folder and find the file to restore. That file is classified as an addition.
  5. Right-click the addition and select Auto Resolve. The file is restored to your sandbox.
  6. Right-click any remaining changes in the Pending patches folder and select Remove from view.
  7. Check in the restored file and deliver it. Other team members can accept the change set to restore the file in their workspaces.