Fox Studios logo Fox StudiosGame projects, devlogs and Scratch builds
Tools

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.

Developer desk with two monitors showing a game level editor and a terminal window, with a drawing tablet and headphones nearby

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.

  1. Install Git LFS from your package manager or the Git for Windows installer, which includes it. Then run git lfs install once per machine.
  2. 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.
  3. Commit the generated .gitattributes file first, on its own, before any assets.
  4. 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.
  5. 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.

UsageWhat eats your quotaHow to reduce it
Fresh clonesFull download of current assetsClone once, then pull
CI buildsRepeated downloads on every runCache the LFS folder between runs
Old versionsStorage grows with each exportCommit art less often, in finished batches
Source art filesHuge PSD and blend filesKeep 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.

  1. Make a full backup copy of the repository folder first.
  2. 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.
  3. 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.

MK
Mira Kovac

Mira teaches coding to beginners and writes the step-by-step guides, always testing each one on someone who has never coded before.

More posts by Mira

More in Tools

01doorganico 084goad 3hot8 4465456 after5internprogram ahandfulofblessings ahmadpc ahomcybersecurity allodialresources annodex antiquesandperiodcollectibles aotc asianworldkashmir beedlectrics bloggertemplatefree bluefeatheragency bodyweightsolution campaign08blog carfixadvisor catstreetcollective cbstvsports cnfanspurchasing committeeof500yearsofdignityandresistance covertopsdjs cs-kaiyuangame cuestacomunicaciontotal cxoutlet dancebetgame deskgearhub destinyvillastay detectmagazine di33 diamondsteelbuildings donmo dyanadropship emarsysfinance emimattl escapechan eskitarih evautoplay everythingweddings-orlando farmzone feedviewerapp gamevui123 gleasongrade greetingsday hacklabasu haskell iw-kaiyun jagoanproperti jilidskripsi joltbusinessfinance juegodepokergratis juegospucca kaeru-festival latestmehndidesigns lestanzediottaviano litemagazines localcommunityhero lustrsazan mariashebets menswheels newwebstechs1 nikkit ootheday oxigenvpn plurfitness prefetial probudgetcarpetcleaning psychicmrsmartin pyaten qvantor rejoignezlogis rexzbot riselayouts ruchin rwxqsgd5 sakaltime shibiaowang shop-bot skrtips spotlesshaven strcoding tetapatrium topselller uneplanteartificielle vipertechcr webtech1223411 wo-kygaming yamaha-mekar yeknava yoybuysheets zenunwa yamaha-mekar jilidskripsi ankertoto ankertoto ankertoto