Search code examples
gitvisual-studio-code

Is there a way to revert to a previous commit in VS code?


Is there a way to revert to a previous git commit in VS code?

I know I can see the changes between commits and the differences in the working tree but I want to know how to reset to the previous commit in visual studio code.


Solution

  • With the source control icon selected, if you then click the ellipsis ... at the top right.

    With v1.48 you will see a list of options for submenus: under Commit is Undo Last Commit. Under Changes is Discard All Changes.

    git submenus