Using Visual Studio Code Version 1.8.1 how do I restore a deleted file in the recycle bin?
This question is related to
visual-studio-code
recycle-bin
Voila! The file is restored and is back in your folder. Happy Coding!
It uses the normal trash bin of your system. So you can grab it our of there.
In Windows you find it in the explorer, in Linux it is as well in Konquerer / Nemo / ...
Running on Ubuntu 18.04, with VS code 1.51.0
My deleted files from VS Code are located at:
~/.local/share/Trash/files
To search for your deleted files:
find ~/.local/share/Trash/files -name your_file_name
Hope my case helped!
While pushing a repository to Github through Vs Studio code I deleted whole folder and they were not available in Recycle bin also. Here is how I recovered those files. For Windows.
The method is to restore the previous version of the Drive in which the deleted file existed
I had deleted files from G: drive, the below images are self explanatory
Open properties menu of the drive
In properties go to previous versions tab, where you can find the previously stored versions of that drive along with date at time of backup use open or click on restore to get the previous version of that drive.
Note: Manipulations in the drive after restore point won't be available
Just look up the files you deleted, inside Recycle Bin. Right click on it and do restore as you do normally with other deleted files. It is similar as you do normally because VS code also uses normal trash of your system.
who still facing the problem on linux and didnt find it on trash try this solution
https://github.com/Microsoft/vscode/issues/32078#issuecomment-434393058
find / -name "delete_file_name"
If your local directory has git initialized and you have not committed the changes that include the delete, you can use git checkout -f
to throw away local changes.
I accidentally discarded changes in the Source Control in VS Code, I just needed to reopen this file and press Ctrl-Z few times, glad that VS Code saves your changes like that.
I know the OP says Recycle Bin. What I do though is recreate the file, especially if it's a single file. And when in the file, I just press CMD+Z (I'm on a Mac) and I get my file back.
If you just deleted the file, know that VSCode 1.52 (Dec. 2020) will support:
Undo file operations in Explorer
Explorer now supports Undo and Redo for all file operations: delete, rename, copy, move, new file and new folder.
Make sure the focus is in the Explorer and trigger the Undo or Redo commands and your last file operation will be undone or redone respectively.
Keep in mind that we have separate undo stacks for the editor and the explorer and we choose which one to undo based on focus.
Source: Stackoverflow.com