Git LFS for Game Projects Without the Usual Headaches
Your game repository was fine for a month, then someone committed a folder of PSD files and now every clone takes 20 minutes and GitHub is warning you about a 100 MB file limit.

Your game repository was fine for a month, then someone committed a folder of PSD files and now every clone takes 20 minutes and GitHub is warning you about a 100 MB file limit. Git LFS for game projects fixes that, but only if you set it up before the big files land, and only if everyone on the team understands what it does.
We moved three projects at Fox Studios onto Git LFS, one of them after the damage was already done. Here is the setup we use now, the costs we did not expect, and the mistakes that cost us an afternoon each.
What Git LFS actually does
Git stores every version of every file in the repository history. That is great for scripts, which are small text files that change a few lines at a time. It is terrible for a 40 MB texture that you re-export 30 times, because now your history holds 1.2 GB for one image.
Git LFS, short for Large File Storage, swaps those big files for tiny pointer files in the history. The real binary lives on a separate LFS server, and your machine only downloads the versions you check out. A clone that used to pull every old version of every texture now pulls only the current ones.
It does not compress anything, and it does not make big files merge. It only moves them out of the main history.
Setting up Git LFS for game projects from day one
Do this on day one, before the first art commit. The whole thing takes about ten minutes.
- Install Git LFS from your package manager or the Git for Windows installer, which includes it. Then run git lfs install once per machine.
- In the project folder, run git lfs track for each binary type. A typical list for a Godot or Unity project: *.png, *.psd, *.aseprite, *.wav, *.ogg, *.mp3, *.fbx, *.blend, *.ttf.
- Commit the generated .gitattributes file first, on its own, before any assets.
- Add a .gitignore for engine caches. For Godot that means the .godot folder. For Unity it means Library, Temp and Build. These should never go into Git or LFS.
- Push and check your host's LFS usage page to confirm the files show as LFS objects.
Which files to track
Track anything binary that changes often or weighs more than about 500 KB. Do not track small text formats like .tscn.tres.json or .prefab files. They diff and merge fine in plain Git, and putting them in LFS throws that away.
The storage and bandwidth costs nobody mentions
LFS is free to set up, but hosting is not unlimited. Every hosting service sets its own storage and bandwidth quotas for LFS, and those quotas change, so check your host's current pricing page before you commit to one.
The trap is bandwidth. Every fresh clone, every CI build and every teammate pulling a new branch downloads LFS files and counts against your quota. A project with 3 GB of assets and a CI job that clones on each push can burn through a small monthly allowance in a few days.
| Usage | What eats your quota | How to reduce it |
|---|---|---|
| Fresh clones | Full download of current assets | Clone once, then pull |
| CI builds | Repeated downloads on every run | Cache the LFS folder between runs |
| Old versions | Storage grows with each export | Commit art less often, in finished batches |
| Source art files | Huge PSD and blend files | Keep raw sources outside the game repo |
The counter-take: not everything belongs in the repo
The usual advice is "put the whole project in version control." For code and game-ready assets, yes. For raw art sources, I disagree.
Our artist saves a 300 MB layered PSD for a single background and touches it twenty times a week. Putting every save into LFS meant gigabytes of storage for intermediate states nobody would ever restore. Now raw sources live in a shared cloud folder with its own version history, and only the exported PNG goes into the game repository. Storage dropped by about 80 percent and nobody lost anything they needed.
The rule we follow: if the engine loads it, it goes in Git or LFS. If only a person opens it in an art tool, it lives in the art folder. This pairs well with the routine in backing up a game project before a crash, since your art folder still needs its own backup.
File locking, so two people do not edit one scene
Binary files cannot be merged. If two people edit the same .blend file or a Unity scene saved as binary, one person's work gets thrown away.
Git LFS has locking for this. Mark a file type as lockable in .gitattributes by adding the lockable flag to its line. Then a teammate runs git lfs lock on the file before editing it, and everyone else sees it as read-only until the owner releases the lock. It feels clunky for the first week. After that, it saves real arguments.
For small teams, a shared chat message saying "I have the level 3 scene" works too, but locking does not forget.
Fixing a repo that already has big files
If large files are already in plain Git history, tracking them now only helps future commits. The old versions still sit in history.
- Make a full backup copy of the repository folder first.
- Run git lfs migrate import with an include pattern for your asset types and the flag that covers every branch. This rewrites history so old commits point to LFS.
- Force push the rewritten branches, then ask every teammate to re-clone fresh. Old clones will conflict badly.
Rewriting history is safe on a small team that can coordinate. On a public repo with outside forks, think twice. When we did this for a jam project, a 2.4 GB clone dropped to 310 MB.
If you are still picking an engine and want to know how each one handles asset files, our guide to choosing a game engine for your first solo project covers file formats. And for a broader list of what we run day to day, see the free tools a small game studio uses.
Frequently asked questions
Do I need Git LFS for a small game project?
If your project is mostly code and pixel art under a few hundred MB, plain Git is fine. Once you have audio, 3D models or textures that change often, LFS keeps clones fast and avoids the 100 MB file limit on hosts like GitHub. Setting it up early costs nothing.
Can I use Git LFS with Unity and Godot?
Yes. Both work well with it. Track binary assets like textures, audio and models, keep text scene files in plain Git, and ignore engine cache folders such as Library in Unity and .godot in Godot.
What happens if I run out of Git LFS bandwidth?
On most hosts, LFS downloads stop working until the quota resets or you buy more. Regular Git operations still work, but teammates will see pointer files instead of real assets. Caching LFS files in CI and avoiding repeated fresh clones prevents most overruns.
More in Tools
Tools
Running Godot 4 on a Low Spec School Laptop Without Lag
Nine of the fourteen laptops in the Tuesday class I teach are the same kind of machine: a four or five year old 14 inch model,...
Tools
Devlog GIF Capture Tools and How to Shrink the Files
The best clip we ever recorded was six seconds of a boss slamming into a wall and dropping its shield, and almost nobody saw it...
Tools
Using butler to Upload itch.io Builds in One Command
We shipped a jam game last spring and then spent two days patching it.