Roll Back Changesets
A changeset is a permanent part of the history of your version-controlled items and cannot be undone or removed. However, you can roll back the effects of one or more changesets.
Tip
You can confirm the changes that result from rolling back some items match what you intend to do before you commit them to the server. See Tips for details.
Required permissions
You must be one of the Contributors for your team project. See Team Foundation Server Default Groups, Permissions, and Roles.
What do you want to do?
Roll back changes from a single changeset
Roll back changes from a range of changesets
Roll back to a specific version
Work from the command prompt
Get tips
Roll back changes from a single changeset
For example, a developer wants to remove the effects of a changeset:
To roll back a changeset from the Changeset Details page
- On the Changeset Details page, choose Rollback.
To roll back a changeset from the History window
- In the History window, open the shortcut menu of a version and choose Rollback Entire Changeset.
To roll back a changeset from Source Control Explorer
In Source Control Explorer, select some items, open their shortcut menu, and choose Rollback.
Note
The items you select determine the scope that the rollback changes.
In the Rollback dialog box, select Rollback changes from a single changeset.
Roll back changes from a range of changesets
For example, a developer wants to remove the effects of some consecutive changesets:
To roll back a changeset from the History window
- In the History window, select two or more consecutive versions, open their shortcut menu, and choose Rollback.
To roll back a changeset from Source Control Explorer
In Source Control Explorer, select some items, open their shortcut menu, and choose Rollback.
Note
The items you select determine the scope that the rollback changes.
In the Rollback dialog box, select Rollback changes from a range of changesets.
Roll back to a specific version
For example, a developer wants to roll back a file to an earlier version, eliminating the effect of all changesets that occurred after that version:
To roll back to a specific version
In Source Control Explorer, select an item, open its shortcut menu, and choose Rollback.
In the Rollback dialog box, select Rollback to a specific version.
Work from the command prompt
Tips
If your change is still pending (you have not yet checked it in), you can undo the change instead of rolling it back. See Develop Code and Manage Pending Changes.
Like most changes you make to files, a rollback change is queued as a pending change. After you roll back the files, you can view the files you are changing and compare the content of the files with the latest version on the server. After you confirm the actual changes match what you intend to do, you can then check them in.