git reset –hard error: Could not parse object

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'

  • Git: How to reset after merging?
  • “unable to append to .git/logs/refs/heads/master” when commiting
  • How to handle Git continuous integration merge conflicts
  • How do I ignore this Eclipse file in Git?
  • CtrlP: ignore files in subdirectory within a git repo
  • How to INCLUDE lib files inside folder in a Git repository
  • Ignore changes to committed .gitignore
  • Using GitHub with another Bug-tracker?
  • git remote branch deleted but still appears in 'branch -a'
  • git won't commit because a deleted file doesn't exist
  • git: replace folder with the same folder on a different branch
  • Git pull/push error: RPC failed; result=22, HTTP code = 408
  • 3 Solutions collect form web for “git reset –hard error: Could not parse object”

    For me, the problem was that on my local machine I needed to pull the latest version of my branch, merge, and commit. Then the git –reset hard {hash} worked on the server I was running the command on.

    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

    This error causes because of abrupt deletion of .git. The command

    rm -rf .git

    removes the whole git files; after that you can reset the head.

    Git Baby is a git and github fan, let's start git clone.