git reset --hard错误:无法解析对象 [英] git reset --hard error: Could not parse object
问题描述
这不是我第一次对存储库进行硬重置,但是这次,我遇到了错误.我正在开发一个iOS项目.我正在从终端进行重置.我该如何解决致命错误
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'
推荐答案
我有相同的问题并已解决.
I have same problem and fixed.
当发生了强制推力之类的变化时,就会发生此问题. 一个Gemfile中引用的git repo.
This problem occurs when there have been changes like force-pushes to a git repo which is referenced in a Gemfile.
解决方案是注释Gemfile中的gem行,运行bundle, 取消注释并再次捆绑.然后Gemfile.lock将引用一个 有效的git版本.
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.
在此链接中找到 https://semaphoreci.com/docs /fail-could-not-parse-object.html
这篇关于git reset --hard错误:无法解析对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!