Yes, there is a way to recover your files, but first, please, please use some form of backups in the future,
git and GitHub are extremely easy to set up and can save you the trouble of recovering your files.
In order to recover your files, you’ll have to recreate the files and revert them to a previous version. For instance, say you have an
index.js file that you accidentally deleted. Recreate the file, then open it. Right click in the blank file, select “File History”, and move the bar at the top backwards, or click the left arrow button to go to the last changes. Once you’ve found the version you want to revert to, click Revert. Your file will now be returned to its original state.
As far as I’m aware, there’s no way to recover files other than that, but I might be wrong. Also, in the future, it’s recommended that you don’t use the
-f (force) flag when removing files, as that could potentially save you deleting all your files.