From: Jeff King Date: Fri, 20 Feb 2009 02:58:10 GMT Subject: Re: Recovering from missing objects? Message-ID: <20090220025810.GB22419@coredump.intra.peff.net> In-Reply-To: <7vvdr6j6hz.fsf@gitster.siamese.dyndns.org> On Thu, Feb 19, 2009 at 04:29:12PM -0800, Junio C Hamano wrote: > > If I clone the remote repository, I have the object in the new clone. > > However, how do I get the missing object back into the .git directory of my > > working repository? > [...] > In the new clone: > > $ IT=c406ab0be69c912ea59233595a071478103cdad8 > $ H=$(git rev-list --objects $IT | git pack-objects mine) > $ mv mine-$H.pack /var/tmp > > Go to the repository that lacks the object and then > > $ git unpack-objects