git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: tom fogal <tfogal@sci.utah.edu>
Cc: git@vger.kernel.org
Subject: Re: rebuild repo from data, packfiles?
Date: Sat, 20 Nov 2010 18:16:48 -0600	[thread overview]
Message-ID: <20101121001643.GB27666@burratino> (raw)
In-Reply-To: <auto-000024044659@sci.utah.edu>

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

  reply	other threads:[~2010-11-21  0:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-20 22:54 rebuild repo from data, packfiles? tom fogal
2010-11-21  0:16 ` Jonathan Nieder [this message]
2010-11-21  2:44   ` tom fogal
2010-11-21  3:27     ` Jonathan Nieder
2010-11-21  3:55       ` tom fogal
2010-11-21  4:19         ` Jonathan Nieder
2010-11-21 19:51       ` tom fogal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101121001643.GB27666@burratino \
    --to=jrnieder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=tfogal@sci.utah.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).