Undeleting Source Control Files—Team Foundation Server
If you have a file marked as "Deleted" but then want to add it to source control, you can undelete the file, which then lets you do this. You might encounter this situation if you rename a file and then create a new file with that name, or if you rename a file to the name of a previously deleted file.
Note You can only undelete files from Microsoft Team Foundation Server and Perforce Helix Core. When you delete files from other source control providers, they are removed from the source control repository.
How to Undelete a Source Control File
- In one of the window panes (e.g., Content Explorer, Project Organizer, Pending Changes window pane), select the relevant file(s).
- Do one of the following, depending on the part of the user interface you are using:
Ribbon Select Source Control > Undelete.
- Right-Click If you have the Content Explorer, Project Organizer, or Pending Changes window pane open, right-click the file you want to undelete and select Source Control > Undelete.
- The Undelete dialog opens. Select the files you want to undelete.
- Click OK.
Example You open the Content Explorer and delete one of the topics. Then you create a topic with the same name in the same folder. That new topic has a "Deleted" status and must be undeleted before it is added to source control.
In order to add the new file to source control, you need to remove the "Deleted" status. Therefore, you right-click on the file, select Source Control, and choose Undelete.