fatal: bad object xxx

前端 未结 12 2098
[愿得一人]
[愿得一人] 2021-02-03 17:00

I tried reverting to a previous git commit with:

git revert xxx

I\'m now receiving this error as a response:

fatal: bad object          


        
12条回答
  •  不思量自难忘°
    2021-02-03 17:50

    Objects that don't exist in the repository give that error message

    E.g.:

     git init
     touch a
     git add a
     git commit -m 0
     # This object is not in the repository.
     git show 1111111111111111111111111111111111111111
    

    As for what causes the problem, it is hard to say without a minimal reproducible example.

    Submodule woes have given me that error once.

提交回复
热议问题