| ms.date | 10/18/2022 |
|---|---|
| ms.topic | include |
| ms.service | azure-devops-repos |
| ms.subservice | azure-devops-repos-git |
-
From the menu bar, choose Git > View Branch History to open the History tab for the current branch.
:::image type="content" source="../media/undo/visual-studio-2019/git-experience/view-history.png" border="true" alt-text="Screenshot of the View Branch History option in the Git menu in Visual Studio." lightbox="../media/undo/visual-studio-2019/git-experience/view-history-lrg.png":::
-
In the History tab for the current branch, right-click the commit you want to revert and choose Revert to create a new commit that undoes the changes made by the selected commit.
:::image type="content" source="../media/undo/visual-studio-2019/common/revert.png" border="true" alt-text="Screenshot of the Revert option in the context menu for a commit in the History window in Visual Studio." lightbox="../media/undo/visual-studio-2019/common/revert-lrg.png":::