Big Files
And Git LFS.
Git is built for text files, like code. It's not great with huge files, like videos, design files, or datasets. Every version of every big file is kept forever, so the repository becomes slow, and very large.

- Git loves text files
- Huge files slow it down
- Every version is kept forever
What to do with big files
First, don't commit things you can recreate, like build outputs, or downloaded packages. Put them in dot git ignore. GitHub blocks files bigger than one hundred megabytes anyway. For big files you really need, like images in a game, use Git LFS, which stands for large file storage.
How Git LFS works
With Git LFS, the repository stores a tiny pointer file instead of the big file. The real file lives on a separate server. You set it up once with git lfs install, then tell it which files to manage, like git lfs track, star dot PSD. After that, you add and commit as usual.
| key | value |
|---|---|
| git lfs install | once per computer |
| git lfs track "*.psd" | choose file types |
| Repository | stores small pointers |
| Big files | stored separately |
Summary
Keep big, generated files out of Git, and use Git LFS for large files you really need. Next, old commands you'll see in online answers.
Key takeaways- Ignore generated files
- 100 MB limit on GitHub
- git lfs track