Reputation: 1154
I was working on some code, which didn't have any kind of git repo set up. I ran:
git init
git remote add origin http://giturl.git
then I ran git add -A
and realized I forgot to create a .gitignore
file.
For some reason I ran git reset --hard
...oops, that was dumb.
It deleted all the files in the folder, and I have no clue how, or if it's even possible to get them back.
Upvotes: 1
Views: 49
Reputation: 1154
Fortunately, I was saved by running git fsck --lost-found
. Because I had at least ran git add -A
, I just had to sift through the blobs to get the data I needed back.
Upvotes: 1