I tried reverting to a previous git commit with:
git revert xxx
I\'m now receiving this error as a response:
fatal: bad object
I just ran into the same error (bad object [hash]) while attempting to merge from a branch my client didn't know about. (Similar to PrzeoR's case, but instead of needing a pull I needed to fetch)
In my case I needed to run git fetch to re-sync my client to the state of the server. Posting this here in case anyone reaches this thread the same way I did and could benefit from this insight.
git pull
git cherry-pick [hash]
fatal: bad object [hash]
git fetch
remote: Counting objects: 8, done. (etc.)
From github.com:repo/branch
* [new branch] branchname
git cherry-pick [hash]
[success]