Re: corrupted Git repository

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

 



> 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

> .git/objects/0a83... probably

Yes, it was a typo.

> The reflog will give you the previous value of HEAD. You can set
> refs/heads/master to that (git update-ref) and then rebuild the lost
> commit on top of that (assuming only one commit is lost). The dangling
> trees are not necessarily due to the corrupt commit object. Have you
> changed any files since the corrupt commit?

Yes, I've changed two files after the last commit (I knew about the
corruption when I was just about to commit the changes).

> Do you remember which files
> you changed in that commit?
>
> Michael

If the the corrupt commit is the last one, yes.

Thanks.

-- Kasra
--
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]