gitignore by file size?

I’m new to .gitignore, so there may be better ways to do this, but I’ve been excluding files by file size using:

find . -size +1G | cat >> .gitignore

Obviously you’ll have to run this code frequently if you’re generating a lot of large files.

Leave a Comment