From: Kasra Khosoussi <kasra.mail@gmail.com>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: git@vger.kernel.org
Subject: Re: corrupted Git repository
Date: Tue, 21 Jun 2011 14:40:47 +0430 [thread overview]
Message-ID: <BANLkTi=GdEfXnAGa6V-33wqX2C-2x-9JQQ@mail.gmail.com> (raw)
In-Reply-To: <4E006682.80101@drmicha.warpmail.net>
Thanks for your help.
I used update-ref and changed refs/heads/master to the sha1 of
previous commit. Then I commit the changes. Everything seems fine now
except (as you previously mentioned), git fsck -full complains about
dangling trees. Is it critical?
-Kasra
On Tue, Jun 21, 2011 at 2:08 PM, Michael J Gruber
<git@drmicha.warpmail.net> wrote:
> Kasra Khosoussi venit, vidit, dixit 21.06.2011 11:30:
>>> Backup now!
>>> I guess you've done that meanwhile anyways, but it's important before
>>> any recovery attempts.
>>
>> Yes, I've done that.
>>
>>> Is your reflog OK, i.e. do you get proper output from "git reflog" or
>>> "git log -g"?
>>
>> No. Before moving the corrupted object git reflog would return:
>> fatal: object 0a83757505387aacc2fd36b3c996729e6bf9d6e5 is corrupted
>>
>> and after moving the file it would say:
>> fatal: bad object HEAD
>
> Oh yes, stupid me, sorry. "git reflog" tries to parse HEAD. But you can
> look at the file directly:
>
> tail .git/logs/HEAD
> tail .git/logs/refs/heads/master
>
> etc. show you what's been going on with those refs lately.
>
> You should be able to pick the the sha1 before the corrupt one from that
> and do things like "git log that_sha1" if only the most recent commit is
> corrupt.
>
> Michael
>
next prev parent reply other threads:[~2011-06-21 10:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-21 6:58 corrupted Git repository Kasra Khosoussi
2011-06-21 8:19 ` Michael J Gruber
2011-06-21 9:30 ` Kasra Khosoussi
2011-06-21 9:38 ` Michael J Gruber
2011-06-21 10:10 ` Kasra Khosoussi [this message]
2011-06-21 10:39 ` Ilari Liusvaara
2011-06-21 10:40 ` Kasra Khosoussi
2011-06-21 13:47 ` Johannes Sixt
2011-06-21 14:26 ` Kasra Khosoussi
2011-06-21 14:32 ` Carlos Martín Nieto
2011-06-21 14:59 ` Kasra Khosoussi
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='BANLkTi=GdEfXnAGa6V-33wqX2C-2x-9JQQ@mail.gmail.com' \
--to=kasra.mail@gmail.com \
--cc=git@drmicha.warpmail.net \
--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).