Git错误:遇到了7个本应为指针但不是的文件 [英] Git error: Encountered 7 file(s) that should have been pointers, but weren't

查看:1963
本文介绍了Git错误:遇到了7个本应为指针但不是的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果暂存文件标记为已修改,那么如何清理存储库?

How to clean repo, if staged files marked as modified?

之后

git reset --hard

我知道

Encountered 7 file(s) that should have been pointers, but weren't:

git clean -fdx

也无济于事.

推荐答案

像他的答案中提到的 Travis Heeter ,请尝试以下命令序列:

Like Travis Heeter mentioned in his answer, Try the following command sequence:

git lfs uninstall
git reset --hard
git lfs install
git lfs pull

如果这不起作用(因为这对我不起作用),则可能会发生以下黑客行为:

In case if this is not working (because this was not working for me), the following hack may work:

git rm --cached -r .
git reset --hard
git rm .gitattributes
git reset .
git checkout .

这对我有用!

这篇关于Git错误:遇到了7个本应为指针但不是的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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