In this repo, .gitattributes tracks *.png with Git LFS. The file g1.png is stored as a normal Git blob in history (not an LFS pointer). Because of that mismatch, Git LFS reports “should have been pointers” and the file cannot be cleanly checked out or discarded. git diff always shows a binary change, even when the user made no edits.
By the way, other file types which tracked by .gitattributes may have same issue, while I only face this issue with .png file.
Proposal (either should work)
- Migrate the file to LFS*
- Exclude this file from LFS in .gitattributes