git/list[1] front-page[2] threads[3] people[4] search[5] about
 

corrupted Git repository

From
Kasra Khosoussi <kasra.mail@gmail.com>
Date
Jun 21, 2011, 06:58 UTC
Message-ID
<BANLkTi=A=DpyfNwEeSd6N6ibCsA5qh_NPQ@mail.gmail.com>
Hi all,

My thesis repository is corrupted and I don't have any recent backup (my files are OK, but the history is lost). I've seen the recovery examples in the manual, but I believe my case is somehow different. The repository is linear.

1- At the beginning, git status/log/fsck -full said:
> fatal: object 0a83757505387aacc2fd36b3c996729e6bf9d6e5 is corrupted
and there was an empty file in .git/objects/01/8375... .
2- If I move the corrupted object, git fsck --ful would return this:
> error: HEAD: invalid sha1 pointer 0a83757505387aacc2fd36b3c996729e6bf9d6e5
> error: refs/heads/master does not point to a valid object!
> dangling tree 06f388dc60cfb014b5e1f70ecdaa568efe6bd0fa
> dangling tree d86f8c75e836e13b6e0336361641223f48fde722

3- I guess I have to edit refs/heads/master and replace the corrupted sha1 with another hash, but I'm not sure how I can find the proper commit (e.g.,maybe by using find -mtime?).

Thanks in advance,
-Kasra
Next: Michael J Gruber
Message 1 of 11 in “corrupted Git repository”
  1. Kasra KhosoussiJun 21, 2011
  2. Michael J GruberJun 21, 2011
  3. Kasra KhosoussiJun 21, 2011
  4. Michael J GruberJun 21, 2011
  5. Kasra KhosoussiJun 21, 2011
  6. Ilari LiusvaaraJun 21, 2011
  7. Kasra KhosoussiJun 21, 2011
  8. Johannes SixtJun 21, 2011
  9. Kasra KhosoussiJun 21, 2011
  10. Carlos Martín NietoJun 21, 2011
  11. Kasra KhosoussiJun 21, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.