After git add .
I ran git rm -r -f .
,and all my local files were deleted accidentally.
After recovering them with git fsck --lost-found
I
I tried to reproduce what you did:
1) git add .
2) rm -r -f *
after this I think that you made a git reset
, or git reset --hard
(wrong choice: it overwrote the index with an empty one because you never did a commit)...
but the correct command were as indicated in my previous answer git checkout-index -af
(but this is useless after the reset)
at this point you gave correctly the git fsck --lost-found
, my suggestion was equivalent with lower level commands (git cat-file...
)
Are you sure that in the directory there was only source code files and not (for example) compiled versions of the python files (extension .pyc)? Perhaps in some hidden directory created by a IDE?