git版本库无法遍历父错误 [英] git repository failed to traverse parent error

查看:147
本文介绍了git版本库无法遍历父错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是一个新手,在今天晚上很开心。我一直在定期进行修改。我保留了两个在unfuddle和beanstalk以及一个本地文件系统远程的远程设备。



从未出现错误,经过几天的工作,我将所做的更改推荐给所有远程控制器,我会保持安全。没有错误,也没有问题。



今天晚上,我去查看了我的项目日志,并得到了这个错误,我的痛苦:

 错误:无法读取a2b6c2fa16e01db9e38d9509606a444e5831330a 
致命:无法遍历提交的父母
78e81a9a7f5cafa5e2af4b95d156364b9a430ac9


当我运行git fsck时,有155行遗漏了这个并且悬挂了它。
很显然,我希望把这个清理干净。我可以在5月29日之前没有任何历史记录如果我能从那以后直接得到它的话。



任何人都可以帮我弄清楚吗?

另外,有什么可能导致这种情况?我能想到的唯一的事情在那个时候已经发生了变化,那就是我将netbeans升级到v7,它应该有git支持,但似乎不能识别现有的软件仓库。

解决方案

我搜索了这个错误并找到了你的页面,在我的情况下,问题在于我完成了:

  git clone --depth 1 https://github.com/example/nifty.git 



<但几个月后,我忘记了我只抓住了最新的提交,当时我试图将它推到另一个遥控器上。我花了一段时间才发现它不是一个受损的回购,但是我从来没有让父母犯下这个事实!希望这可以帮助别人。



这个解决了我的问题:

  git fetch --unshallow 


I am a newcomer to git and was quite happy until this evening. I have been committing changes regularly. I maintain two remotes on unfuddle and beanstalk and a local filesystem remote.

Never had an error and after a days work, I push my changes up to all the remotes believing that woud keep me pretty safe. There were no errors and no problems.

This evening, I went to look over the log of my project and got this error for my pains:

error: Could not read a2b6c2fa16e01db9e38d9509606a444e5831330a
fatal: Failed to traverse parents of commit 
       78e81a9a7f5cafa5e2af4b95d156364b9a430ac9

As far as I can see the history is good as far back as May 29th. I cannot clone a copy from any of the remotes. There are no other clones anywhere that I could use to recover the repository. I don't even really know when it broke. I checked the FAQ but I have no idea what the author of the repository recovery section is talking about.

WhenI run git fsck, I get 155 lines of missing this and dangling that. Clearly, I would like to get this cleaned up. I can live with no history prior to May 29th If I could get it straight from then onwards.

Can anyone help me get this straight?

Also, what could cause this? The only thing I can think of that has changed in that period is that I upgraded netbeans to v7 which is supposed to have git support but seems not to recognise existing repositories.

解决方案

I googled this error and found your page, in my case the problem was that I had done:

git clone --depth 1 https://github.com/example/nifty.git

but months later, forgetting that I had only grabbed the latest commits, when I tried to push it to another remote it complained. It took me a little while to figure out that it wasn't a damaged repo but just the fact that I never had the parent commits! Hopefully that helps someone.

This fixed it for my case:

git fetch --unshallow

这篇关于git版本库无法遍历父错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆