Share via


How to: Roll Back a Changeset

Though a changeset is a permanent part of the record and technically cannot be undone or removed, you can use the following procedure to effectively roll back a changeset. This procedure is a common way of correcting a check-in mistake.

Note

The following steps refer to file in singular, but the process is the same for a group of files.

Required Permissions

To perform these procedures, you must have the Check out permission set to Allow. For more information, see Team Foundation Server Permissions.

To revert to a prior version of the file

  1. In Source Control Explorer, right-click the file whose changeset you want to roll back, and then click Get specific version on the context menu.

  2. In the Get dialog box, select the prior version of the file, and then click Get. For more information, see How to: Retrieve Old Versions of Files from Changesets.

  3. After this file is in your workspace, right-click the file, and then click Check Out for Edit on the context menu.

  4. Right-click the file again, and then click Check In Pending Changes.

  5. In the Check In - Source Files dialog box, select the file, and then click Check in.

    The Resolve Conflicts dialog box appears.

  6. Click Resolve to open the Resolve version conflict dialog box.

  7. Select Discard server changes.

  8. Click OK.

    Note

    To review your decision before discarding the server changes, you can click Compare to view the server and local copies simultaneously.

  9. In the Resolve Conflicts dialog box, click Close.

  10. In Source Control Explorer, right-click the file, and then click Check In Pending Changes.

  11. In the Check In - Source Files dialog box, click Check in.

See Also

Concepts

Submitting Changes to the Source Control Server

Other Resources

Resolving Conflicts (Team Foundation Source Control)