web analytics

How To Rollback Changesets in TFS and DevOps?

Options

codeling 1602 - 6666
@2021-03-25 17:48:48

When you check in your changes in TFS or DevOps, they are stored on the server as a changeset. Changesets contain the history of each item in version control. 

A changeset is a permanent part of the history of your version-controlled items and cannot be undone or removed. You can view a changeset to see what the exact file changes were, discover the owner's comments, find linked work items, and see if any policy warnings were triggered, moreover you can also roll back the effects of one or more changesets.

List changesets that update a specific file or folder

1. In Solution Explorer or Source Control Explorer, browse to the folder or file, open its shortcut menu, and choose View History.

2. In the History window, select the row that contains the changeset for which you want to view details, open its shortcut menu, and then choose Changeset Details.

The Changeset Details page appears in Team Explorer.

@2021-03-25 17:51:20

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
  1. In Source Control Explorer, select an item, open its shortcut menu, and choose Rollback.

    The items you select determine the scope that the rollback changes.

  2. In the Rollback dialog box, select Rollback changes from a single changeset.

@2021-03-25 18:41:39

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
  1. In Source Control Explorer, select an item, open its shortcut menu, and choose Rollback.

    The items you select determine the scope that the rollback changes.

  2. In the Rollback dialog box, select Rollback changes from a range of changesets.

@2021-03-25 19:13:50

Roll back an item to a specific version

If you just want 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
  1. In Source Control Explorer, select an item, open its shortcut menu, and choose Rollback....

  2. In the Rollback dialog box, select Rollback to a specific version.

Comments

You must Sign In to comment on this topic.


© 2024 Digcode.com