I changed all of the line endings in my project from dos mode to unix mode by removing all of the carriage returns from any file that had them:
grep -lIUr '^M' . | xargs sed -i 's/^M//'
I thought that it would ignore hidden dotfiles like .git/
, but it didn't, and now my git repository has been mangled.
git fsck
gives
Checking object directories: 100% (256/256), done.
error: inflate: data stream error (incorrect data check)
fatal: loose object 62f7323e2a025640a25214f13a670097876c1683 (stored in .git/objects/62/f7323e2a025640a25214f13a670097876c1683) is corrupt
There aren't any other copies of the repository checked out anywhere. Is there any way to recover from this? Is my repo dead?