gpt4 book ai didi

Git 错误 "non-monotonic index"

转载 作者:太空狗 更新时间:2023-10-29 12:46:12 31 4
gpt4 key购买 nike

我的 git 设置有一个我推送到的中央存储库。今天我决定使用 Git Extensions 查看中央存储库,它说该存储库没有提交(几乎就像从未创建过存储库一样)。调查这个问题,我尝试克隆 repo,它给了我一些我从未见过的奇怪错误:

error: non-monotonic index C:/Temp/N1/Netduino/.git/objects/pack/pack-29a18084cf61cd0322a6e9cfd485ce0977348c53.idx
error: non-monotonic index C:/Temp/N1/Netduino/.git/objects/pack/pack-29a18084cf61cd0322a6e9cfd485ce0977348c53.idx
error: non-monotonic index C:/Temp/N1/Netduino/.git/objects/pack/pack-29a18084cf61cd0322a6e9cfd485ce0977348c53.idx
error: non-monotonic index C:/Temp/N1/Netduino/.git/objects/pack/pack-29a18084cf61cd0322a6e9cfd485ce0977348c53.idx
error: non-monotonic index C:/Temp/N1/Netduino/.git/objects/pack/pack-29a18084cf61cd0322a6e9cfd485ce0977348c53.idx
error: non-monotonic index C:/Temp/N1/Netduino/.git/objects/pack/pack-29a18084cf61cd0322a6e9cfd485ce0977348c53.idx
error: non-monotonic index C:/Temp/N1/Netduino/.git/objects/pack/pack-29a18084cf61cd0322a6e9cfd485ce0977348c53.idx
error: non-monotonic index C:/Temp/N1/Netduino/.git/objects/pack/pack-29a18084cf61cd0322a6e9cfd485ce0977348c53.idx
error: non-monotonic index C:/Temp/N1/Netduino/.git/objects/pack/pack-29a18084cf61cd0322a6e9cfd485ce0977348c53.idx
error: non-monotonic index C:/Temp/N1/Netduino/.git/objects/pack/pack-29a18084cf61cd0322a6e9cfd485ce0977348c53.idx
error: non-monotonic index C:/Temp/N1/Netduino/.git/objects/pack/pack-29a18084cf61cd0322a6e9cfd485ce0977348c53.idx
error: non-monotonic index C:/Temp/N1/Netduino/.git/objects/pack/pack-29a18084cf61cd0322a6e9cfd485ce0977348c53.idx
error: non-monotonic index C:/Temp/N1/Netduino/.git/objects/pack/pack-29a18084cf61cd0322a6e9cfd485ce0977348c53.idx
error: non-monotonic index C:/Temp/N1/Netduino/.git/objects/pack/pack-29a18084cf61cd0322a6e9cfd485ce0977348c53.idx
error: non-monotonic index C:/Temp/N1/Netduino/.git/objects/pack/pack-29a18084cf61cd0322a6e9cfd485ce0977348c53.idx
error: non-monotonic index C:/Temp/N1/Netduino/.git/objects/pack/pack-29a18084cf61cd0322a6e9cfd485ce0977348c53.idx
error: non-monotonic index C:/Temp/N1/Netduino/.git/objects/pack/pack-29a18084cf61cd0322a6e9cfd485ce0977348c53.idx
error: non-monotonic index C:/Temp/N1/Netduino/.git/objects/pack/pack-29a18084cf61cd0322a6e9cfd485ce0977348c53.idx
error: non-monotonic index C:/Temp/N1/Netduino/.git/objects/pack/pack-29a18084cf61cd0322a6e9cfd485ce0977348c53.idx
error: non-monotonic index C:/Temp/N1/Netduino/.git/objects/pack/pack-29a18084cf61cd0322a6e9cfd485ce0977348c53.idx
error: non-monotonic index .git/objects/pack/pack-29a18084cf61cd0322a6e9cfd485ce0977348c53.idx
error: non-monotonic index C:/Temp/N1/Netduino/.git/objects/pack/pack-29a18084cf61cd0322a6e9cfd485ce0977348c53.idx
fatal: unable to read tree cc90183a1571664f80712c0376f59afeb681303f

我已经在谷歌上搜索了这个问题,StackOverlow 上也有关于这个问题的另一个问题,但仍然没有答案 ( this question )。任何人都可以阐明这个问题吗?谢谢

最佳答案

我正在搜索此类非单调错误的信息并找到此链接:http://git.661346.n2.nabble.com/Error-non-monotonic-index-after-failed-recursive-quot-sed-quot-command-td7575014.html

TL;DR:您删除非单调索引,然后重新索引它。在 Linux 中它将是:

> rm .git/objects/pack/pack-29a18084cf61cd0322a6e9cfd485ce0977348c53.idx
> git index-pack .git/objects/pack/pack-29a18084cf61cd0322a6e9cfd485ce0977348c53.pack

在此之后我必须运行一些 git gc --prune=nowgit remote prune origin,但我之前已经做了一些其他操作,所以我可能有破坏了我的 repo 协议(protocol)。

关于Git 错误 "non-monotonic index",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11597738/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com