SourceTree错误:' git status'代码128失败:错误:膨胀:数据流错误(错误的标题检查)

时间:2017-06-14 12:21:55

标签: git atlassian-sourcetree

I got this error with open SourceTree

$ git fsck --full
error: inflate: data stream error (incorrect header check)
error: unable to unpack 06c147f2771e280dfb4758c9a83b94346993d172 header
error: inflate: data stream error (incorrect header check)
fatal: loose object 06c147f2771e280dfb4758c9a83b94346993d172 (stored in .git/objects/06/c147f2771e280dfb4758c9a83b94346993d172) is corrupt

另外,试试这个,并删除所有损坏的对象。删除对象后,我写了这个命令,

$ git reset --hard
error: unable to read sha1 file of 3X/3X.Core/Resources/Resource.Designer.cs (d46f74436ae02ec61a659a8a487aee5747e2feda)
error: unable to read sha1 file of 3X/3X.Core/Resources/Resource.resx (63342162564404ccae4917489dc78ebb65075f8a)
error: unable to read sha1 file of 3X/3X.Web/Views/Job/ConfirmationAdvice.cshtml (ff39e42f5cf0e0703bd9dfe84a4b746ff91eea40)
error: unable to read sha1 file of 3X/3X.Web/Views/Job/Create.cshtml (3a97827faac6c62fd24f347dd0b0951c27c03751)
error: unable to read sha1 file of 3X/3X.Web/Views/Job/DataEntry.cshtml (89f381bafaeff53eeaf64a26d8c9608e9e86b6a1)
error: unable to read sha1 file of 3X/3X.Web/wwwroot/js/viewjs/Job/create.js (1b62c618c31add2ca28d107c1a49604492409ecf)
fatal: Could not reset index file to revision 'HEAD'.

并得到以上错误

3 个答案:

答案 0 :(得分:1)

它应该被破坏。请尝试删除此.git/objects/06/c147f2771e280dfb4758c9a83b94346993d172

如果您与另一个对象出现相同的错误,请尝试删除所有这些并再次获取。

答案 1 :(得分:0)

这是对我有用的解决方案 我打开服务器并转到.git /,然后从那里下载索引文件,然后手动删除了本地.git / index文件,并用下载的索引文件替换了文件

答案 2 :(得分:0)

尝试删除.git文件夹中的索引文件

Windows系统:

del .git\index
git reset

Linux系统:

rm -f .git/index
git reset

如果您手动删除了索引文件,则需要执行

git reset