Git error: Encountered 7 file(s) that should have been pointers, but weren't
Like Travis Heeter mentioned in his answer, Try the following command sequence:
git lfs uninstallgit reset --hardgit lfs installgit 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 --hardgit rm .gitattributesgit reset .git checkout .
This worked for me!
I had this exact error with some files stored with git-LFS and solved it the same way I've solved a linending induced borked index .
Clear the cache and do a hard reset:
git rm --cached -r .git reset --hard
This was significantly faster than a fresh clone for me due to the huge git-LFS files in my repo.
Since git lfs 2.5.0, there is a new command available that makes this easier (docs):
git lfs migrate import --no-rewrite "broken file.jpg" "another broken file.png" ...
This "migrates" files to git lfs which should be in lfs as per .gitattributes
, but aren't at the moment (which is the reason for your error message).
--no-rewrite
prevents git from applying this to older commits, it creates a single new commit instead.
Use -m "commitmessage"
to set a commitmessage for that commit.