From: Jonathan Nieder <jrnieder@gmail.com>
To: david@lang.hm
Cc: git@vger.kernel.org
Subject: Re: how to recover a repository
Date: Thu, 16 Dec 2010 22:45:30 -0600 [thread overview]
Message-ID: <20101217044530.GA8590@burratino> (raw)
In-Reply-To: <alpine.DEB.2.00.1012162024020.22269@asgard.lang.hm>
Hi David,
david@lang.hm wrote:
> I managed to do a 'rm *' in the .git directory (the usual sort of
> fat-fingering when cleaning up after another mistake)
>
> the subdirectories are still there.
I'd suggest:
1. Make a backup!
2. From the worktree (i.e. parent to the .git directory),
run "git init".
3. git update-ref HEAD refs/heads/(branch you were on)
4. git reset; # (alas, the old index file is gone)
5. git diff; gitk --all
See gitrepository-layout(7) for details.
next prev parent reply other threads:[~2010-12-17 4:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-17 4:28 how to recover a repository david
2010-12-17 4:45 ` Jonathan Nieder [this message]
2010-12-17 20:20 ` david
2010-12-17 21:22 ` Jeff King
2010-12-17 22:30 ` david
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=20101217044530.GA8590@burratino \
--to=jrnieder@gmail.com \
--cc=david@lang.hm \
--cc=git@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.