如何诊断和修复git fatal:无法读取树 [英] How to diagnose and fix git fatal: unable to read tree
问题描述
我使用 git
来管理项目中的文件,并继续处理此问题。
当我运行 git status
时,我得到消息
致命:无法阅读树e2d920161d41631066945a3cbcd1b043de919570
据我了解,我应该检查 git的输出fsck
,并且我收到
从树中断开的链接e09a42f248afff64336fbbec2523df97c26451ac
到树e2d920161d41631066945a3cbcd1b043de919570
从树e09a42f248afff64336fbbec2523df97c26451ac
到树9b0dd389bd7f9e8d257395d57e0881b7957f9698
损坏的链接,以树9e288a4ad60d63f342dfd18237980674426aa725
损坏的链接,以树2a04647337089f554fab8c49cfd37149e5f4fc9f
断开的链接从树e09a42f248afff64336fbbec2523df97c26451ac
。从树e09a42f248afff64336fbbec2523df97c26451ac
来自t的断开链接ree e09a42f248afff64336fbbec2523df97c26451ac
to tree ea16658b45ce961adc3c3f519b0e8d9672918ca8
连同大量缺失blob
消息。
遵循各种资源(例如 Git - 断开的链接,丢失&悬挂树木)我只是从 github
重新克隆项目,然后重新开始。
一旦我重新克隆了这个项目,所有对 git
的想法,并且我想尝试理解正在发生的事情。我该如何诊断和解决这个问题?
这就是 a href =https://stackoverflow.com/a/18687206/6309>如何修复损坏的git仓库?。
但是,如果完全克隆不能解决问题,那么它可能是:
- GitHub端的回购损坏(联系GitHub支持检查)。
- 客户端(您的Ubuntu)存在某种损坏。请务必检查问题是否仍然存在于最新的Git版本(1.8.5.2 -1)从自定义PPA(个人套餐档案)。
2016年7月更新,Git 2.10即将发布,您现在拥有:
git fsck --name-objects
请参阅如何解决从树到树的git错误断开链接? 。
I'm using git
to manage files on a project, and keep running into this problem.
When I run git status
I get the message
fatal: unable to read tree e2d920161d41631066945a3cbcd1b043de919570
As I understand it, I should check the output of git fsck
, and I receive
broken link from tree e09a42f248afff64336fbbec2523df97c26451ac
to tree e2d920161d41631066945a3cbcd1b043de919570
broken link from tree e09a42f248afff64336fbbec2523df97c26451ac
to tree 9b0dd389bd7f9e8d257395d57e0881b7957f9698
broken link from tree e09a42f248afff64336fbbec2523df97c26451ac
to tree 9e288a4ad60d63f342dfd18237980674426aa725
broken link from tree e09a42f248afff64336fbbec2523df97c26451ac
to tree 2a04647337089f554fab8c49cfd37149e5f4fc9f
broken link from tree e09a42f248afff64336fbbec2523df97c26451ac
to tree ea16658b45ce961adc3c3f519b0e8d9672918ca8
together with a lot of missing blob
messages.
Following various resources (e.g Git - Broken Links, Missing & Dangling Trees) I have simply re-cloned the project from github
and started again.
Once I have re-cloned the project, all is good for a few commit
s, and then the problem arises again. Re-cloning every time doesn't seem to be optimal, and seems to go against the idea of using git
, and I'd like to try and understand what is going on. How can I diagnose and fix this problem?
Following my older recommendation, it boils down to being able to find a repo which actually contains the missing elements (here full trees).
This is what is shown in "How to fix corrupted git repository?".
But if a full clone doesn't solve the problem, then it may be:
- a corruption of the repo on the GitHub side (contact GitHub support to check).
- some kind of corruption on the client side (your Ubuntu). Make sure to check if the issue persists with the latest Git release (1.8.5.2-1) from a custom PPA (Personal Package Archive).
Update July 2016, with Git 2.10 soon to be release, you now have:
git fsck --name-objects
See "How to fix git error broken link from tree to tree?" for more.
这篇关于如何诊断和修复git fatal:无法读取树的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!