Like Adam said, recover the object frmo another repository/clone.
Don't forget to take into account packs. So, a more generalized procedure is this:
On a 'complete' git database
git cat-file -p a47058d09b4ca436d65609758a9dba52235a75bd > tempfile
and on the receiving end
git hash-object -w tempfile