Re: rebuild repo from data, packfiles?

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

 



tom fogal wrote:

> My thought is to cat-file all my commits, filter out the ones which are
> upstream, order them by date, and git-am them back into a repo.
> 
> Some of my data only exist in blobs, though... maybe git-diff-tree
> can get me the patch I need?  Not quite sure what to diff it with,
> though... maybe the most-recent sha1 I have, based on date?
> 
> Other ideas would certainly be welcome!

What did "git fsck" say?

If it is possible to unambiguously recover your data without using any
external knowledge, then that would imply a bug imho --- why doesn't
git do it automatically?  Chances are some objects are missing ---
blobs, trees, commits, or tags --- and you will have to fill in some
information for a full recovery.

Perhaps you have another copy of those objects somewhere.  Have you
ever cloned this repo or pushed to another machine?

Sometimes it is possible to recover some specific object with
detective work; see howto/recover-corrupted-blob-object.txt in the
Documentation directory for an example of that.

git does not use text diffs for its object storage.  The information
the repository can give you directly consists of binary deltas and
full objects.

Are the old refs (branches and tags) intact?  More generally, what
files does

 ls -lR .git

list in the old repository?

Regards,
Jonathan
--
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]