|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
How to: Undo Pending Changes
Team Foundation source control functionality is easily manipulated within the Visual Studio environment. The following procedures describe how to undo pending changes from Source Control Explorer and from the command line using the .
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.
To undo pending changes in Source Control Explorer
In Source Control Explorer, navigate in the Folders list to find the folder associated with the items for which you want to undo pending changes.
In the lists of items to the right of the Folders section, use the Pending Change column and status icons to identify the file or folder for which you want to undo pending changes. For more information, see.
Right-click the folder or file for which you wish to undo pending changes, and choose Undo Pending Changes; the Undo Pending Changes dialog box appears.
In the Files listing, ensure that the folder or file for which you wish to undo pending changes is selected, and click Undo Changes; you are returned to Source Control Explorer with the pending change type 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 (unless you have performed a get operation since pending the edit; in which case 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 from the command line
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 available for the Checkin command, see.