【发布时间】:2018-07-23 07:58:27
【问题描述】:
我在本地和远程都迁移了一个存储库,现在由于树对象错误,我无法推送(或做很多事情),
> git push
error: Could not read 4218a5a380d8b6cbc7f461c22cb48ed66a92c850
fatal: bad tree object 4218a5a380d8b6cbc7f461c22cb48ed66a92c850
fatal: The remote end hung up unexpectedly
4218a5a380d8b6cbc7f461c22cb48ed66a92c850 在我的文件系统中不存在,
> dir 4218a5a380d8b6cbc7f461c22cb48ed66a92c850 /s /p
Volume in drive C is OS
Volume Serial Number is xxxxxxxx
File Not Found
我有我所有的源代码文件。我现在唯一的选择是核对 git 存储库并重新开始历史记录吗?
【问题讨论】:
-
您在发布问题之前有tried any of these options 吗?
-
是的,
git reset --hard不能解决问题。 -
从该十六进制中删除前两位数字并重复您的 dir 命令
dir 18a5a380.... /s /p,这会返回任何内容吗?还知道它可能驻留在包文件中,因此您的 dir 命令实际上对您没有帮助。 -
我搜索了
18a5a380d8b6cbc7f461c22cb48ed66a92c850。它也不存在。git reflog --all中有一个指向4218a5a380d8b6cbc7f461c22cb48ed66a92c850的提交,该提交是合并到 origin/master。 origin/master 在 github,但现在我的遥控器是 bitbucket。 -
git fsck说什么?
标签: git corruption