Help with recovering deleted files

I require support for the issue I am facing, below says the problem I am facing,

  1. My internet connection is disabled.
  2. Right clicked in my desktop and selected "Create Repository"option using Git
  3. Once repository is created, then all the files in the desktop got a ‘blue colored question mark’ icon. I never committed the files. 
  4. I used Git Clean using the UI to remove the reference, just right clicked in the desktop and choose Tortoise Git -> Clean -> only selected ‘Do not use Recycle Bin’ option.
  5. Now Git clean command ran and all my files in the desktop were gone.
  6. Then I ran the $ git fsck  --lost-found
  7. I got some files inside the folder named as ‘lost-found’
  8. All the file names were hashed with SHA1 & file types were missing.

Please help me in getting the deleted files, since all were related to my project and I accidently deleted them.

Kindly help me in recovering my files.

Hi @balamu783,

Welcome to the Community! You asked a new question in the comments of a not-completely related thread that was already marked as  Resolved. Please note that your question may get more engagement if you just open up a new topic in the correct board.


Thank you @mpboom. That is correct.

@balamu783, thanks for being here! I’ve moved your comment from an already-existing thread into it’s own topic. Because your question is slightly different from the original thread you posted in, you’ll more likely get help with this open as a new topic.

Best of luck!

Unfortunately, this sounds like you’re asking a question about TortoiseGit and I’m not sure how their Clean functionality works. You may want to check with the support page for TortoiseGit itself. If it uses the underlying git clean implementation, that is a command specifically for deleting files that are not included in your Git repository, meaning that there is no record or backup of them in Git. Unfortunately, this most likely means that unless they went to some sort of OS-specific recycle bin or trash folder, that the files are not going to be easily recoverable and not something that we’re going to be able to assist with.

Let us know if you have more questions.

1 Like

Nope :frowning:

I have selected the ‘Do not use recycle bin’ option and the files got bypassed and deleted permanently (Shift + Delete).

But I see some of the files (hashed) inside the ‘.git -> objects’ folder location. Looking for a way to recover those files using any Git Command.

If the files were tracked by Git, then you should be able to use the git reflog feature to go backwards in time and restore your repository to a previous state. Check out this GitHub blog post for information on the feature and some sample scenarios. However, if the files were not tracked by Git (because git clean only deletes files not tracked by Git), then that feature may still not help.

1 Like