My development repository at some point lost an object.
$ git fsck
fatal: failed to read object 2ffffdc84156fa30e4614a7ea5a1895885011b8db8: Invalid argument
$ git
I recently had a bunch of missing objects in a local repository and an uncorrupted reference repository to restore it from. Here's the magic I came up with that worked for me:
cd
git unpack-objects < /objects/pack/pack-.pack
It turns out that all of the objects I needed were in a pack file in the reference repository instead of in separate "loose" object files. This simple incantation unpacks that pack file into the local database, filling in the holes. After doing
git gc
to cleanup any dangling commits (i.e. due to rebasing, amend commits, etc.) my git fsck is now clean.