git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Barr <davidbarr@google.com>
To: Edmondo Porcu <Edmondo.Porcu@gottexbrokers.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: Objects deleted before first commit
Date: Tue, 14 Jun 2011 22:57:54 +1000	[thread overview]
Message-ID: <BANLkTikSPNVbGFRUVh5eSFsxabVWT7SVVA@mail.gmail.com> (raw)
In-Reply-To: <8269100C7056D24A91B672AF7E5E48492D959E@exchange.GottexBrokers.local>

On Tue, Jun 14, 2011 at 10:43 PM, Edmondo Porcu
<Edmondo.Porcu@gottexbrokers.com> wrote:
> I have created a git repository, and then I have deleted by error some files with rm -rf .
> Now the files have disappeared from the hard disk, I am desperately looking on how to restore them. The objects folder is full of dangling objects, but I do not know how to recover them.

If you did use 'git add' to stage your work before the unfortunate
invocation of rm, the blobs should be accessible.

Something like the following might work:
git show `cd .git/objects; ls ??/* | tr -d /`

This will pretty print all loose objects.
--
David Barr.

  reply	other threads:[~2011-06-14 12:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-14 12:43 Objects deleted before first commit Edmondo Porcu
2011-06-14 12:57 ` David Barr [this message]
2011-06-14 13:00   ` Edmondo Porcu
2011-06-14 13:06     ` David Barr
2011-06-14 14:44       ` PJ Weisberg
2011-06-14 14:46         ` Edmondo Porcu
2011-06-14 14:56           ` Carlos Martín Nieto
2011-06-14 14:57           ` PJ Weisberg
2011-06-14 14:59         ` Edmondo Porcu
2011-06-16 20:38         ` Tomas Carnecky

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=BANLkTikSPNVbGFRUVh5eSFsxabVWT7SVVA@mail.gmail.com \
    --to=davidbarr@google.com \
    --cc=Edmondo.Porcu@gottexbrokers.com \
    --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 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).