Are there any shortcuts that allows a user to undo changes(similar to command+z
) but back to when the file was last saved? I'm currently getting this done by closing files, discarding changes, and reopening them but this is tedious. Thanks!
Click unsaved:* in status bar or launch Command Palette(Mac: F1 or Shift + Command + P , Windows and Linux: F1 or Shift + Ctrl + P ), Execute Unsaved Files: Show command and select a unsaved file as you like.
To do the same in Visual Studio, right-click the commit you want to revert and then select Revert.
Select those files/folders and right click on them to open the Git context menu, where you can click Undo Changes... to discard them. The files will be reset to the unmodified stage: Sometimes, before performing any commit or undoing the changes, you may want to check what has been changed since your last commit.
In the top left menu:
File > Revert File
On mac this does not have a shortcut assigned per default. You will have to assign a shortcut yourself.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With