Undo Pending Changes
If you have made changes to one or more files that are under version control and you want to discard those changes, you can undo those pending changes. You might do this if a change is believed to be too risky, or if testing determines that the change introduces new quality or performance issues. If you have already checked in the change and want to revert it, you must instead roll back the change. For more information, see Roll Back Submitted Changes.
To perform these procedures, you must own the workspace or have the Undo other user's changes permission set to Allow. For more information, see Team Foundation Server Permissions.
To undo pending changes in Source Control Explorer
In one of the following windows, navigate to the items for which you want to undo pending changes:
Solution Explorer, which you can open from the View menu.
Source Control Explorer.To open this window, on the View menu, click Other Windows and then click Source Control Explorer.
Pending Changes. To open this window, on the View menu, click Other Windows and then click Pending Changes.
Right-click the folder or file for which you want to undo pending changes, and click Undo or Undo Pending Changes.
In the Undo Pending Changes dialog box, select the check box for each file for which you want to undo pending changes, and click Undo Changes.
In Source Control Explorer the pending change type is removed in the Pending Change column.
If you undo an edit, your copy of the file is replaced with an unmodified version of the file you checked out. If you have performed a get operation since pending the edit the version you tried to get will be downloaded).
If you undo a delete, the version you deleted is restored (unless you have performed a get operation since pending the delete; in which case the version you last tried to get will be downloaded).
If you undo an add, the file is left undisturbed.
To undo a pending change at a command prompt
Click Start, click All Programs, point to Microsoft Visual Studio 2005, point to Visual Studio Tools, and then click Visual Studio Command Prompt.
Type cd path, where path is the location of the directory used to store your personal copy of the files in the server (for example, c:\projects).
Type tf undo <folder or filename> and then press ENTER.
For the full syntax of the Undo command, see Undo Command.