Git error “non-monotonic index”

后端 未结 2 1929
感动是毒
感动是毒 2021-02-20 11:36

My git setup has a central repository to which I push. Today I decided to look at the central repository using Git Extensions, and it said that the rep

2条回答
  •  遥遥无期
    2021-02-20 12:13

    I was searching for info in this kind of non-monolitic error and found this link: http://git.661346.n2.nabble.com/Error-non-monotonic-index-after-failed-recursive-quot-sed-quot-command-td7575014.html

    TL;DR: you remove the non-monolotic index and then reindex it. In linux it would be:

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

    After this I had to run some git gc --prune=now and git remote prune origin, but I had done some other operations before so I may have spoiled my repo.

提交回复
热议问题