How do you undo “Discard all changes” in VS Code/Git

I just know only one solution to resolve this problem.
You must remember every file name which you have changed.

Step 1: Enter Ctrl + Shift + P on VSC

Step 2: Choose the option “Local History: Find Entry to Restore”

Step 3: Find the file which you want to restore

Step 4: Choose a time you save that file

Step 5: Copy file content and restore it

enter image description here

enter image description here

enter image description here

Leave a Comment