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

Kate Zz picture Kate Zz · Oct 12, 2017 · Viewed 46.3k times · Source

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

After

git reset --hard

I get

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

Running git clean -fdx doesn't help, either.

Answer

AKA picture AKA · Feb 21, 2019

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 .

This worked for me!