How to undo 'Discart All Changes' from Visual Studio Code

Asked

Viewed 1,423 times

1

In Visual Studio Code, the "Sourse Control: GIT tab" in "Discart All Changes" deleted the changes made and some files I created. There is a way to reverse this and recover the deleted files?

  • These files were already committed?

  • There were no @Felipe Avelar

  • You had already given . add or something like?

  • I didn’t do any git @hugocsl action, I just programmed the files

1 answer

3


Changes that were not committed cannot be recovered as they have never been "tracked" by git, so unfortunately, it does not have a snapshot with these changes.

If you have any plugin in vs code that sees the local history, as is the case of local history, you can recover the files by editing history.

  • I suspected that this would be the correct answer. Everything I read, including, reinforces the idea that git does not maintain "unstaged changes". I found, inslusive, that answer in the international SO which reinforces that there is no more hope

Browser other questions tagged

You are not signed in. Login or sign up in order to post.