git reset --hard error: Could not parse object

learner picture learner · Sep 17, 2014 · Viewed 28.1k times · Source

This is not the first time I am doing a hard reset on my repo but this time, I am getting an error. I am working on an iOS Project. I am doing the reset from terminal. How do I fix the fatal error

fatal: Could not parse object 'e88056ac5d58fb0bbd23d3fe929eac01712d964'

Answer

Jiggs picture Jiggs · Sep 29, 2016

I have same problem and fixed.

This problem occurs when there have been changes like force-pushes to a git repo which is referenced in a Gemfile.

The solution is is to comment that gem line in Gemfile, run bundle, uncomment it and bundle again. Then the Gemfile.lock will reference a valid git revision.

Found in this link https://semaphoreci.com/docs/fail-could-not-parse-object.html