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'

  • Script getting git working directory root?
  • How to push a local repository to remote use “SourceTree”
  • git credential fill rejects my input
  • Git push to heroku
  • git - How do I switch the content of two branches?
  • In what cases could `git pull` be harmful?
  • TFS GIT REST API get related work items of commit
  • Master failed to write error while pushing commit
  • Permission denied when cloning git repository
  • Git whitespace/line ending
  • How Do I Pull a Single Commit In Git?
  • finding the name of git branch from remote server
  • 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.