问题
- git 拉取代码后偶尔会出现"Encountered 3 file(s) that should have been pointers, but weren't"提示。这些损坏的文件即便删除,还原代码后仍然会出现。
解决方法
- 删除
git lfs
格式配置文件后丢弃所有修改即可。
git rm .gitattributes
git reset --hard
//丢弃所有修改,使用前记得git stash save
保存工作
其他
- 也可尝试使用这个链接中的方法。 (很久没出现过这个问题了,我还没试过)
https://tech-notes.maxmasnick.com/fixing-files-that-should-have-been-pointers-in-lfs-but-werent (来自这里)