fatal: bad object xxx

前端 未结 12 2223
[愿得一人]
[愿得一人] 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:42

    This issue can arise when there's an outdated or corrupted branch stored locally.

    Deleting the file .git/refs/remotes/origin/xxx (after making a backup!) then fetching a fresh copy from the server worked for me.

    More detail at GitHub.

提交回复
热议问题