1

I used VS Code for angular and VS 2022 for the backend. I implemented the codes using VS 2022 for the backend and then closed VS 2022. Then I accidentally hit revert all changes in VS Code and caused the changes to be lost. Those changes are uncommitted and unstashed. Is there any way to recover those changes?

Tried AppData\Roaming\Code\Backups\a0bb9f3e4045ff1cafbc2c6c038fa8a9\file but nothing inside. Tried the recycle bin and nothing was there.

torek
  • 448,244
  • 59
  • 642
  • 775
  • 3
    Nope, you are out of luck. – SupaMaggie70 b Nov 22 '22 at 23:31
  • 1
    let it be a lesson that there are commands you have to think twice before using, the computer does not have a safety net for everything, install an incremental backup system if you are that error prone – rioV8 Nov 22 '22 at 23:42
  • 1
    Unfortunately git will not help here. Check if VS 2022 have some form of history feature, or turn to generic file recovery tools for your system. – LeGEC Nov 23 '22 at 04:15
  • 1
    If the file is still open, try `ctrl-z` carefully. – ElpieKay Nov 23 '22 at 07:51

1 Answers1

0

Check if your VSCode has the timeline view activated.

If yes, try and recreate an (empty) file that was discarded, and see if the timeline view shows any history: you would be able to get back its content from it.

However, that process does not scale well, as you would need to recreate every discarded file.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250