I'm initializing a new Git repo with a huge pile of files. The repo is using Git LFS. I want to ensure that I've told LFS to track all files that should be handled, before I make my first commit.
I see that git lfs ls-files
will list all the files that ARE tracked by LFS. However, (a) I want the opposite: all files in the repo that aren't tracked by LFS (and are in .gitignore
), and (b) this command only works after you have committed files.
Does anyone have some git-fu or Ubuntu-fu to list all the files in the repo that aren't ignored and aren't matched by the track patterns in the various .gitattribute
files Git LFS uses?
The closest I've come is this command that lists files in the repo over 100kB, and then manually scanning all the files and hope that I've them covered by a tracking pattern.
find . -type f -exec du -Sha -t 100000 {} +
cut
command (-f3
) should be-f3-
in case there's a space in one of the paths. – Lontson