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.
- Search for the change set: Click Change sets. , and then select
- In the Search for Change sets window,
enter information about the deleted file or folder:
- In the Name begins with field, type the name of the deleted file or folder.
- In the Modifies field, type the name of the component from which the file or folder was deleted.
- Optional: In the Creator field, type the name of the user who deleted the file or folder.
- If you have other information that can identify the change set, enter it in the appropriate field.
- 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.
- In the Pending Changes view, expand the Pending patches folder and find the file to restore. That file is classified as an addition.
- Right-click the addition and select Auto Resolve. The file is restored to your sandbox.
- Right-click any remaining changes in the Pending patches folder and select Remove from view.
- Check in the restored file and deliver it. Other team members can accept the change set to restore the file in their workspaces.