Re: Git clone error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Wed, 1 Aug 2007, Linus Torvalds wrote:
> 
> > If I just recreate a version I'm happy with, can I add that to the repo and
> > go from there?
> 
> Well, it's not so much a version _you_ are happy with: you'd have to be 
> able to re-create the exact old version (with the exact same SHA1), in 
> order for git to be happy.

Btw, if you really cannot re-generate it, you'd basically need to create a 
whole new git archive without that blob (or basically with that blob 
replaced by another version).

We don't have wonderfully good support for that, because, quite frankly, 
we've not had this happen before. I think every time before, people have 
had the blob in some other copy of their git archive.

But the thing to use is "git filter-branch", which can take a git history 
and munge it arbitrarily. It would be the "tree-filter" that you'd use to 
replace that one blob that you cannot regenerate with another (ie you 
might decide to just replace the original version of the file with that 
*second* version, and regenerate the tree that way).

I'm cc'ing Dscho explicitly to see if he can help you with the exact 
syntax, and maybe we could even make this into a user-manual entry about 
how to handle corruption. I don't think we have anything in the 
documentation about this - we only cover the trivial cases where the 
objects are all good, but you've lost the pointers into it because you 
removed a branch by mistake or something.

		Linus
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux