fatal: bad object xxx

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

    I got this error while trying to cherry-pick a commit whose hash I had copied from GitHub. This commit was on a branch that I hadn't pulled, just like PrzeoR.

    Unlike PrzeoR a git fetch didn't help at first because the branch had been deleted on GitHub. Fortunately I was able to find the corresponding (closed) Pull Request and to restore the branch on GitHub.

提交回复
热议问题