Undo Pending Changes (Team Explorer Everywhere)

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. You cannot roll back changes by using Team Explorer Everywhere. You must instead use the command-line client for Visual Studio. For more information, see the following page on the Microsoft Web site:Rollback Command (Team Foundation Version Control).

When you revert changes, you will be prompted to confirm the operation for any files that have changed. You will not be prompted if any of the following conditions are true:

  • The pending change is not of type edit.

  • The pending change has no working folder mapping. This should occur only if the mapping was removed.

  • The file’s contents have not changed from the server.

In this topic

Required Permissions

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 the following topic on the Microsoft Web site: Team Foundation Server Permissions.

Undo Pending Changes from the Team Foundation Server Plug-in for Eclipse

To undo pending changes, you open the Undo Pending Changes dialog box and then you revert specified changes. You can open the Undo Pending Changes dialog box from several locations.

To open the Pending Changes dialog box

  • In the Pending Changes window, highlight the changes that you want to discard and click Undo on the Pending Changes toolbar.

    Note

    The selection state of the check box that corresponds to each item in the Pending Changes window is ignored.

  • In Project Explorer or Package Explorer, right-click the items for which you want to revert changes, point to Team, and click Undo Pending Changes.

  • In Source Control Explorer, right-click the folder or file that for which you want to revert changes, and click Undo Pending Changes. For information about how to open Source Control Explorer, see Open Source Control Explorer.

The Undo Pending Changes dialog box appears.

To undo a pending change

  1. In the Files list, verify that you want to undo changes for all the items for which the corresponding check box is selected.

    If you do not want to undo changes to one or more of the listed items, clear the corresponding check box.

  2. Click Undo Changes to revert changes to the specified items.

  3. In the confirmation dialog boxes, confirm, skip, or cancel the changes.

    The changes to the specified files are discarded.

Undo Pending Changes from a Command Prompt

When you undo changes from a command prompt, you must specify a file or folder. If you are unsure about which files are checked out within a folder, you should consider using tf status to verify the pending changes before you revert them. For more information, see the following topic on the Microsoft Web site: Status Command (Team Foundation Version Control).

To undo a change from a command prompt

  1. Open a command prompt.

  2. Browse to the folder that contains the files or folders for which you want to revert changes.

  3. At the command prompt, type tf undo ItemSpec, where ItemSpec is the file or folder for which you want to revert changes, and then press ENTER.

    For the full syntax available for the Undo command, see the following topic on the Microsoft Web site: Undo Command (Team Foundation Version Control).

See Also

Tasks

Check in Pending Changes (Team Explorer Everywhere)

Other Resources

Submitting and Undoing Pending Changes (Team Explorer Everywhere)