I've inherited a repository that has been using Git LFS to track certain extensions. I want to remove all files from LFS and to stop using it entirely.
After I untrack all extensions (i.e. leaving an empty .gitattributes file), when I try a git lfs ls-files -s
command, I see that it still seems to think that all of the files which are 0 bytes in length are still in LFS, e.g.
e3b0c44298 * source/BIM/Graphics/gizmo_home.cpp (0 B)
e3b0c44298 * source/BIM/Graphics/gizmo_home.h (0 B)
e3b0c44298 * source/BIM/Graphics/gizmo_show.cpp (0 B)
e3b0c44298 * source/BIM/Graphics/gizmo_show.h (0 B)
e3b0c44298 * source/serverapp/baseline_object_cache.h (0 B)
There are quite of few of these, the above are just a sample of the complete list.
I really don't understand why these files are being listed. Worse, I can't seem to get them out of LFS. Interestingly they all share the same OID (e3b0...) even though they're all distinct files. And the files extensions (.h, .cpp etc) were never tracked by LFS as far as I know, so how they got in there in the first place is something of a mystery.
Can anyone suggest how to remove these files from LFS? Or simply how to remove every file from LFS. If anyone can explain why zero-byte files seem immune to removal, I'd be interested to learn the reason.
After updating Git for Windows, and Git LFS to the latest version, these zero-byte files are no longer being reported as stored in LFS. I have to assume the older version of LFS that I was using (3.0.1, iirc), is a bit buggy and has since been fixed.