r/github • u/Classic-Asparagus • 12d ago
Question Is it unwise to commit thousands of (cropped) PNGs that I'm analyzing in a project?
Basically I am doing this project where I am analyzing the pixels of a ton of PNG screenshots from my computer. I am currently using two computers, which is why I am currently committing them instead of keeping them local, but idk if the size of this would get too big and get flagged by GitHub eventually? Git LFS is something I am considering, although cropping the PNGs is something that has reduced a lot of the storage compared to screenshotting the whole screen
1
Upvotes
14
u/Some-Internet-Rando 12d ago
Typically you'll put them in a blob store bucket, and commit the link to the bucket. If you absolutely need to use git, at least store them in git lfs rather than plain files.
Also for large binary files, consider "lore" by Epic.
6
u/VisibleWeight 12d ago
Its not uncommon to have playwright or similar regression tests in GitHub repositories in the form of cropped pngs
6
u/oscarandjo 12d ago
I did something like this once when I was a student, hundreds of thousands of small image files.
In the end GitHub support emailed me and kindly asked me to move my workload out of GitHub because my repo was failing on some internal processes because its use-case was not suitable for GitHub.
3
u/Convergent-Tech 12d ago
Just git a bucket somewhere. R2 on cloudflare is pretty much free.
1
u/davorg 12d ago
Git was designed for tracking changes in source code files. If you're not storing text then you're not making use of most of the advantages of Git (and, therefore, GitHub).
Something like AWS S3 would be a much better place to store these images.
Having said that, GitHub does support a number of image formats and even gives you limited tools for working with them:
1
u/Least_Ad_1795 12d ago
Committing thousands of PNGs directly can make your Git repository unnecessarily large. I'd recommend Git LFS or external storage for large image datasets. Keep only essential sample images in Git and use a shared dataset folder for the rest. Also, check GitHub's file size limits.
1
u/funkdefied 12d ago
HuggingFace might be a more appropriate place for large datasets like this
1
u/beachandbyte 12d ago
For just 1000s probably no big deal but if you do more it is far more useful as huggingface dataset
1
u/Altruistic-Log-6292 10d ago
Yes, it is
1
u/cyb3rofficial 12d ago
i know people who place images in a zip/7z file and put them in releases, no idea if that is EULA/TOS safe, but it's pretty common.
1
u/Takeoded 12d ago
Keep them in their own dedicated branch that can easily be purged if it becomes a problem. Should be smooth sailing.