Game Dev Cheat Sheet

Git for Game Dev

.gitignore templates, Git LFS setup, workflows, and large binary strategies for game development teams.

Version control for games is harder than for web or mobile apps because game projects contain large binary files (textures, models, audio) that Git was not designed for. This guide covers the essential setup: .gitignore templates to keep your repository clean, Git LFS for binary assets, and the workflows most game teams use daily.

Engine:

.gitignore Templates

Unity .gitignore
[Ll]ibrary/
[Tt]emp/
[Oo]bj/
[Bb]uild/
[Bb]uilds/
[Ll]ogs/
[Uu]ser[Ss]ettings/
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd
*.pdb
*.mdb
*.opendb
*.VC.db
*.pidb.meta
*.pdb.meta
*.mdb.meta
crashlytics-buildid.txt
sysinfo.txt
*.apk
*.aab
*.unitypackage
*.app

Git LFS Setup

LFS track commands
git lfs install
git lfs track "*.png"
git lfs track "*.jpg"
git lfs track "*.psd"
git lfs track "*.tga"
git lfs track "*.wav"
git lfs track "*.mp3"
git lfs track "*.ogg"
git lfs track "*.fbx"
git lfs track "*.obj"
git lfs track "*.blend"
git lfs track "*.unitypackage"
git lfs track "*.asset"

Add these to .gitattributes. Commit .gitattributes before adding binary files.

Common Workflows

Feature branch

git checkout -b feature/player-movement
# work on your feature...
git add -A && git commit -m "Add player movement"
git push -u origin feature/player-movement
# create PR on GitHub / GitLab

Revert a broken commit

git revert HEAD            # safe: creates a new commit
git reset --soft HEAD~1    # undo last commit, keep changes

Stash work in progress

git stash push -m "WIP: inventory UI"
git stash pop

Resolve merge conflict

git merge main
# resolve conflicts in your editor
git add .
git commit

Tag a release build

git tag -a v1.0.0 -m "Release 1.0.0"
git push origin v1.0.0

Large Binary Strategy Reference

StrategyMax file sizeCostBest for
Git LFS~2 GBFree tier variesMost game studios
Git AnnexUnlimitedSelf-hostedLarge studios with own infra
Perforce (assets only)UnlimitedPer-seatAAA studios
.gitignore + cloud syncN/AVariesSolo devs, small projects