0

I was cloning my git repo (which was empty). As it was empty, I didn't notice it didn't finish cloning yet and I added files/folders to it, but it got destroyed before the cloning finished, and all my files/folders disappeared, is there any way to recover them please ?

Thank you

User34t
  • 1
  • 1
  • If they were not added or committed, then your best bet is to use your IDE's file history. – evolutionxbox Aug 25 '22 at 12:44
  • 1
    Does this answer your question? [Recover from losing uncommitted changes by "git reset --hard"](https://stackoverflow.com/questions/5788037/recover-from-losing-uncommitted-changes-by-git-reset-hard) – evolutionxbox Aug 25 '22 at 12:45
  • When I do ```git fsck --lost-found``` I get this: Checking object directories: 100% (256/256), done. notice: HEAD points to an unborn branch (master) notice: No default references I indeed had 256 files, but idk how to get them back from here – User34t Aug 25 '22 at 12:58
  • you can read the content of the files with blob but the name of the file will be lost. git show will output you the content of file. – Harish Barma Aug 25 '22 at 13:12
  • Thank you everyone, I found one of the many folders I tried to commit had a commit in it so I could resolve it. – User34t Aug 25 '22 at 13:38

0 Answers0