Skip to content

Latest commit

 

History

History
93 lines (52 loc) · 4.25 KB

File metadata and controls

93 lines (52 loc) · 4.25 KB
title Roll back changesets
titleSuffix Azure Repos
description Understand how to roll back changesets by using Visual Studio with Team Foundation Version Control (TFVC).
ms.assetid 11864092-7a1d-4810-ae01-148afbaa7852
ms.service azure-devops-repos
ms.topic how-to
ms.date 11/23/2022
monikerRange <= azure-devops
ms.subservice azure-devops-repos-tfvc

Roll back changesets

[!INCLUDE version-lt-eq-azure-devops] [!INCLUDE version-vs-gt-eq-2019]

A Team Foundation Version Control (TFVC) changeset is a permanent part of the history of your version-controlled items and can't be undone or removed. However, you can roll back the effects of one or more changesets.

You can also use the tf command-line utility to roll back changes. For more information, see Rollback command (Team Foundation Version Control).

Prerequisites

[!INCLUDE contributor-only-prerequisites]

Roll back changes from a single changeset

For example, a developer wants to remove the effects of a changeset:

Diagram that shows changes from one changeset.

To roll back a changeset from the Changeset Details page

  • Select the changeset, and on the Changeset Details page of Visual Studio Team Explorer, choose Rollback.

To roll back a changeset from the History window

  • In the Visual Studio History window, right-click a version and choose Rollback Entire Changeset.

To roll back a changeset from Source Control Explorer

  1. In Visual Studio Source Control Explorer, right-click an item and choose Rollback.

    [!NOTE] The item you select determines the scope that the rollback changes.

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

  3. Specify the changeset, and then select Rollback.

Roll back changes from a range of changesets

For example, a developer wants to remove the effects of some consecutive changesets:

Diagram showing multiple changesets.

To roll back a range of changesets

  1. From the History window, select two or more consecutive versions, right-click, and choose Rollback.

    Or, in Source Control Explorer, right-click an item and choose Rollback.

    [!NOTE] The item you select determines the scope that the rollback changes.

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

  3. Specify the changeset range, and then select Rollback.

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:

Diagram that shows a single changeset to roll back to.

To roll back to a specific version

  1. In Source Control Explorer, right-click an item and choose Rollback.

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

  3. Specify the version details, and then select Rollback.

Next steps