Re: rebuild repo from data, packfiles?

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

 



Hi Tom,

tom fogal wrote:

> Long story short, I lost some metadata in a repo I've got.  However,
> my entire .git/objects/ && subdirs is intact, so I'm hopeful my data's
> still accessible in some form.

Here's what I'd suggest.

 1. Backup what you have.
 2. git init newrepo
 3. rsync -a .git/refs .git/objects .git/packed-refs newrepo/.git/
 4. cd newrepo && git fsck --lost-found

See the repository-layout manual page[1] for details.

Hope that helps,
Jonathan

[1] http://www.kernel.org/pub/software/scm/git/docs/gitrepository-layout.html
--
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]