'recover files due to mistakes with git

I made the following steps:

  • I had some files F1, F2, F3, ... in a folder F initialized with git clone from a remote empty repository
  • I executed git add .

Then I made two mistakes:

  • first, I ran in F: git reset --hard HEAD
  • second, I removed the .git folder in F

Now the directory F is empty and I have lost all my files. Is there any way to recover the files?

git


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source