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 TFS default groups, permissions, and roles [redirected].
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
For example, a developer wants to remove the effects of a changeset:
- On the Changeset Details page, choose Rollback.
- In the History window, open the shortcut menu of a version and choose Rollback Entire Changeset.
In Source Control Explorer, select an item, open its shortcut menu, and choose Rollback.
Notitie
The items you select determine the scope that the rollback changes.
In the Rollback dialog box, select Rollback changes from a single changeset.
For example, a developer wants to remove the effects of some consecutive changesets:
- In the History window, select two or more consecutive versions, open their shortcut menu, and choose Rollback.
In Source Control Explorer, select an item, open its shortcut menu, and choose Rollback.
Notitie
The items you select determine the scope that the rollback changes.
In the Rollback dialog box, select Rollback changes from a range of changesets.
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:
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.
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.
Rollback does not delete changesets or any data. If you change your mind, use rollback to revert the content of the files back to their state before the rollback.