开发者

Error: fatal loose object ### (stored in .git/objects/.... is corrupt)

开发者 https://www.devze.com 2023-03-23 05:54 出处:网络
I just fired up gitk as usual but this time I received a fatal error message: fatal: loose object 58008283f6ad152ac44a1b6da961795ababe5b93 (stored in .git/objects/58/008283f6ad152ac44a1b6da961795abab

I just fired up gitk as usual but this time I received a fatal error message:

fatal: loose object 58008283f6ad152ac44a1b6da961795ababe5b93 (stored in .git/objects/58/008283f6ad152ac44a1b6da961795ababe5b93) is corrupt
fatal: loose object 58008283f6ad152ac44a1b6da961795ababe5b93 (stored in .git/objects/58/008283f6ad152ac44a1b6da961795ababe5b93) is corrupt
    while executing
"close $gdtf"
    (procedure "gettreediffline" line 36)
    invoked from within
"gettreediffline file1071e148 58008283f6ad152ac44a1b6da961795ababe5b93"
    ("eval" body line 1)
    invoked from within
"eval $script"
    (procedure "dorunq" line 11)
    invoked from within
"dorunq"
    ("after" script)

I clicked OK on the error message box, exited gitk, then started gitk again -- this time it came up without any errors (just as usual).

What does this error mean and why did I receive it?

Should I start worrying about the integrity of my repository? (at this point still local, in a .git subdirectory)

UPDATE: I just ran git fsck as suggested below and I got:

git fsck
dangling blob 6302f0a93a8d793b473e1a1976f221827b595ed7
dangling blob 5246a9d7408b1d5d01e9c471a67c1f0866f0d626
dangling blob ec08d18657f37e5bbdbebc7dc25615037b532463
dangling blob 8b69b97bdc45f3c86405f6开发者_如何转开发7a5f396d122408ad64
dangling blob aa39e78673ec3f2cb575798be1d2b4555c637475
  1. What does "dangling blob" mean?
  2. How could this have happened?
  3. Is there a way to fix this?


Since git fsck is clean and you don't see the error anymore, I would venture to guess that there was some corruption in memory.

I know you said that you only have been working locally and don't want to share, but it is still a good idea to have a backup that is at least on a different disk and preferably a different physical location. If you don't mind your project being open source you can use github or free.

Links on backing up a git repo

0

精彩评论

暂无评论...
验证码 换一张
取 消