A minimal repository template that provides ready-to-use .gitignore files for both Unity and Unreal Engine projects, so you can spin up a properly configured Git repository in minutes.
GameDevelopmentTemplate/
├── README.md ← You are here
├── LICENSE
├── .gitattributes ← Git LFS tracking rules for binary assets
└── Gitignores/
├── Unity.gitignore ← Gitignore for Unity projects
└── Unreal.gitignore ← Gitignore for Unreal Engine projects
On GitHub, click "Use this template" → "Create a new repository" (or go to Settings → Template repository to enable the button).
This gives you a fresh repository with all the template files but none of the template's Git history.
git clone https://github.com/<your-username>/<your-repo>.git
cd <your-repo>Skip this step if you do not plan to store large or binary assets (textures, audio, video, 3D models, etc.).
The repo works perfectly fine without LFS for small projects.
Git LFS replaces large binary files in your repository with lightweight text pointers, storing the actual file content on a separate server.
This keeps git clone fast and prevents the repository from ballooning in size.
a) Install Git LFS (one-time, per machine):
| Platform | Command |
|---|---|
| macOS (Homebrew) | brew install git-lfs |
| Windows (winget) | winget install GitHub.GitLFS |
| Ubuntu / Debian | sudo apt install git-lfs |
| Other | Download from git-lfs.github.com |
b) Enable LFS in your shell (one-time, per machine):
git lfs installc) Verify that .gitattributes is present
This template already includes a .gitattributes file at the root with LFS tracking rules for the most common game-dev binary formats (images, audio, video, 3D models, Unreal assets, and more).
Open it to review the tracked patterns, and add or remove entries to suit your project:
# Example: track an additional file type
git lfs track "*.cubemap"
# git lfs track writes to .gitattributes automaticallyd) Commit .gitattributes (already done if you are using this template as-is):
git add .gitattributes
git commit -m "Add Git LFS tracking rules"
git pushe) Cloning a repo that uses LFS
git clone fetches LFS pointers automatically when Git LFS is installed.
To pull LFS files into an existing clone that was checked out before LFS was set up:
git lfs pullCopy (or move) the contents of your Unity or Unreal Engine project folder directly into the root of the cloned repository.
Your directory should look something like this after pasting:
Unity example:
<your-repo>/
├── Assets/
├── Packages/
├── ProjectSettings/
├── Gitignores/
│ ├── Unity.gitignore
│ └── Unreal.gitignore
└── README.md
Unreal Engine example:
<your-repo>/
├── Content/
├── Source/
├── Config/
├── <YourProject>.uproject
├── Gitignores/
│ ├── Unity.gitignore
│ └── Unreal.gitignore
└── README.md
Pick the gitignore that matches your engine and move it to the root of the repository, renaming it to .gitignore.
Unity:
mv Gitignores/Unity.gitignore .gitignoreUnreal Engine:
mv Gitignores/Unreal.gitignore .gitignoreDelete the Gitignores/ folder — you only need one gitignore and it is now in the right place.
rm -rf Gitignores/git add .
git commit -m "Initial project setup"
git pushThat's it! Git will now correctly ignore engine-generated files, build artifacts, and OS metadata going forward.
Both files are thoroughly commented.
Here are the highlights of what is ignored and why:
| Pattern | Reason |
|---|---|
Library/ |
Unity's local asset-import cache — rebuilt automatically, often several GB |
Temp/ |
Short-lived editor temp files |
Obj/ |
C# compiler intermediate output |
Build/ / Builds/ |
Platform build output (APK, EXE, etc.) |
Logs/ |
Editor and player log files |
UserSettings/ |
Per-developer editor preferences |
*.csproj, *.sln |
IDE project files regenerated by Unity |
.vs/, .idea/ |
Visual Studio / Rider workspace metadata |
StreamingAssets/aa/ |
Addressables local build cache |
*.apk, *.aab, *.app |
Packaged game binaries |
*.unitypackage |
Exported Unity packages |
.DS_Store, Thumbs.db |
OS-generated metadata files |
| Pattern | Reason |
|---|---|
Binaries/ |
Compiled engine and game binaries — large, machine-specific |
Build/ |
UBT build system output |
DerivedDataCache/ |
Shader and asset cache — can be multi-GB, always rebuilt |
Intermediate/ |
UBT intermediate files |
Saved/ |
Autosaves, logs, screenshots, crash dumps |
Plugins/*/Binaries/ |
Compiled plugin binaries (source is still tracked) |
*.sln, .vs/, .vscode/ |
IDE files regenerated by UBT |
Engine/ |
Full engine source (reference via .uproject instead) |
*.pak, *.ucas, *.utoc |
Cooked/packaged game data |
*.pdb, *.lib, *.exp |
Live-coding helper files |
.DS_Store, Thumbs.db |
OS-generated metadata files |
This template ships with a .gitattributes file that configures Git LFS for common game-development binary asset types.
Binary files (textures, audio clips, 3D models, video, etc.) are not efficiently stored by Git — even a single change to a large file adds the entire new copy to the repository history.
Git LFS stores those files on a dedicated server and keeps only a small text pointer in the repository, so:
git clonestays fast regardless of how many large assets you add over time.- Repository size on disk stays small for developers who only need the source code.
- Binary diffs remain meaningful (LFS servers can show which files changed).
The included .gitattributes covers:
| Category | Extensions |
|---|---|
| Images | .png .jpg .jpeg .gif .bmp .tga .tiff .psd .exr .hdr |
| 3D Models & Animation | .fbx .obj .blend .dae .3ds .abc |
| Audio | .wav .mp3 .ogg .aif .aiff .flac |
| Video | .mp4 .mov .avi .mkv |
| Fonts | .ttf .otf |
| Unreal Engine assets | .uasset .umap |
| Archives | .zip .7z .rar |
To add more types, run git lfs track "*.ext" — it will append the new pattern to .gitattributes automatically.
Developers who do not need large asset storage can work with this template without installing Git LFS.
They will see LFS pointer files instead of the actual binary content for LFS-tracked files, but all source code and configuration remains fully accessible.
See LICENSE for details.