If you decide you want to undo edits made to a file in your local workspace, you can revert to your last saved version using the Undo operation. When you issue an Undo on a file, TFS replaces the edited file with the last version downloaded from the server to your TFS workspace. Undo is available from either the Team menu or from the Pending Changes - Source Files view.
To Undo a Pending Change from the Team menu:
Right-click a checked out file in your Source Control Files view. From the popup menu, select Undo Pending Changes... Note: The file must have an edit pending to use the undo operation. Undo is not available on files not checked out or pending a change.

The Undo Pending Changes dialog displays the file to be reverted, the type of change pending, and the local path. Click OK to undo changes. Note: you can also undo a change on a folder or group of files. When you do an Undo on one or more files, all files are listed here.

When the undo process is complete the Source Control Files view no longer displays the pending edit in the files pane and the the Pending Changes - Source Files view removes it from the list as well. The file is reverted to the last saved verion.
To Undo a Pending Change from the Pending Changes - Source Files view:
Click on the Source Files tab. Check the file you wish to revert. Right-click and select Undo.

Click OK in the Undo Pending Changes dialog. The file will be removed from the Pending Changes - Source Files list. If it does not go away, click the refresh icon in the top right corner of the view.
Note: To make new changes to a file, you will need to check the file out again.
Related Tasks: