From: Junio C Hamano Date: Tue, 01 Mar 2011 00:25:17 GMT Subject: Re: problem with updating a shallow clone via a branch fetch Message-ID: <7vtyfng00i.fsf@alter.siamese.dyndns.org> In-Reply-To: Rick Bradley writes: > So I have a git repo that is shallow cloned: > > % git clone --depth 1 > > Sometimes (very rarely), when I do a branch fetch to update that > repository I get an error: > > % git fetch origin +refs/head/:refs/remotes/origin/ > > fatal: did not find object for shallow The message comes from the repository you are fetching from. When you fetch from a shallow clone, the fetch process on your end tells the other side what commits your incomplete history ends at, and if the other end does not have any of these commits, you get that message. So the only case (unless there is a bug---and I don't think this codepath is heavily exercised so it is very possible there are bugs) you would see that message is if the other side rewound the branch and then later garbage collection lost the commit.