Re: Objects deleted before first commit

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

 



On Tue, Jun 14, 2011 at 10:43 PM, Edmondo Porcu
<Edmondo.Porcu@xxxxxxxxxxxxxxxxx> 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.
--
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]