错误:致命的松散对象 ###(存储在 .git/objects/.... 中已损坏)

发布于 2024-11-26 11:03:47 字数 1293 浏览 0 评论 0原文

我刚刚像往常一样启动了 gitk,但这次我收到了致命错误消息:

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)

我在错误消息框中单击“确定”,退出 gitk,然后启动 gitk< /code> 再次 - 这次没有任何错误(就像往常一样)。

这个错误是什么意思?为什么我会收到它?

我应该开始担心我的存储库的完整性吗? (此时仍然是本地的,在 .git 子目录中)

更新: 我刚刚按照下面的建议运行了 git fsck ,我得到了

git fsck
dangling blob 6302f0a93a8d793b473e1a1976f221827b595ed7
dangling blob 5246a9d7408b1d5d01e9c471a67c1f0866f0d626
dangling blob ec08d18657f37e5bbdbebc7dc25615037b532463
dangling blob 8b69b97bdc45f3c86405f67a5f396d122408ad64
dangling blob aa39e78673ec3f2cb575798be1d2b4555c637475
  1. : “悬空的斑点”是什么意思?
  2. 怎么会发生这种事?
  3. 有办法解决这个问题吗?

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 8b69b97bdc45f3c86405f67a5f396d122408ad64
dangling blob aa39e78673ec3f2cb575798be1d2b4555c637475
  1. What does "dangling blob" mean?
  2. How could this have happened?
  3. Is there a way to fix this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

铜锣湾横着走 2024-12-03 11:03:47

由于 git fsck 是干净的并且您不再看到错误,因此我大胆猜测内存中存在一些损坏。

我知道您说过您只在本地工作并且不想共享,但是至少在不同的磁盘上并且最好在不同的物理位置上进行备份仍然是一个好主意。如果您不介意您的项目开源,您可以使用 github 或免费。

有关备份 git 存储库的链接

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文