Unreal Engine .gitignore template
The Unreal template ignores compiled binaries, intermediate build output, the derived data cache and the saved directory, along with generated project files.
At a glance
- Category
- Framework
- Patterns in this template
- 13 rules
- Directories ignored
- 5 of the 13 rules end in a slash, so they match directories only
- Also needs an OS template
- Yes. Content folders collect file manager metadata files quickly on a mixed team.
- Typical companions
- C++ for the compiler rules, plus an IDE template and an OS template.
In detail
Binaries holds the compiled game and editor modules. Intermediate holds everything on the way there: generated headers from the reflection system, object files, and the build graph. Both are produced from the source and the project files, and both are large enough that committing them dominates the repository within a few builds.
DerivedDataCache is the asset processing cache. Source assets are stored in one format and cooked into platform specific forms on demand, and the cache holds those cooked results keyed by content hash. It is regenerated as needed, it is machine local, and on a project with a real content set it is measured in tens of gigabytes.
Saved is the runtime output directory: logs, crash reports, autosaves, screenshots, configuration written by the editor as you work. Autosaves in particular are a trap, because they are full copies of assets you are editing, so a committed Saved directory can be larger than the content it duplicates.
The Visual Studio rules cover *.sln, *.suo, *.sdf, *.opensdf, *.opendb, *.VC.db and .vs. Project and solution files are regenerated by a right click command on the project file, so they are output rather than source. *.xcodeproj and *.xcworkspace are the same idea for a macOS toolchain.
What this template cannot help with is the content itself. Unreal assets are large binary files that do not diff or merge, so a team working on the same asset needs file locking and large file storage rather than an ignore rule. The ignore file keeps the derived data out; the content strategy is a separate decision.
Examples
Binaries/
DerivedDataCache/
Intermediate/
Saved/
.vs/
*.VC.db
*.opensdf
*.opendb
*.sdf
*.sln
*.suo
*.xcworkspace
*.xcodeproj13 lines exactly as the tool writes them, before any common additions you tick.
Things that catch people out
- Config is not ignored and should not be: the project configuration files under it are source, even though the editor writes to them.
- Binary assets do not merge. An ignore file solves the derived data problem but a team still needs large file storage and a locking workflow for the content directory.
- Saved contains crash reports that include machine names and file paths. Ignoring it is right, but a dump that was committed once is still in the history.
Try it: .gitignore Generator
Pick one or more templates, tick the common additions you want, and copy or download the combined .gitignore.
.gitignore Generator
LOCAL · Browser-OnlyGenerate comprehensive .gitignore files by combining templates for languages, frameworks, IDEs, and operating systems
Language
Framework
IDE
OS
Build Tool
Infrastructure
Common Additions
Preview
Select templates or common additions to generate a .gitignore file.
Related .gitignore templates
All .gitignore templates →C++ .gitignore template
The C++ template adds CMake output to the usual compiler artefacts, and its Makefile rule will ignore a hand written Makefile. Here is what each line covers.
Unity .gitignore template
The Unity template ignores the import cache, temporary build state and the IDE project files the editor regenerates, using bracket classes for case safety.
Windows .gitignore template
What the Windows template covers: the thumbnail caches Explorer writes into image folders, the folder view settings file, and installer package extensions.
VS Code .gitignore template
This template ignores the .vscode folder's contents but keeps five files back on purpose, which is the clearest statement of the commit or ignore argument.
IntelliJ IDEA .gitignore template
The IntelliJ template ignores the whole .idea directory and the module files, which is simpler than the alternative and loses some settings worth sharing.
Eclipse .gitignore template
The Eclipse template ignores the project descriptor, classpath file and settings folder, which is right for a build tool project and wrong without one.
Tools for this
- .gitignore Generator Generate .gitignore files for any project - 50+ templates for languages, frameworks, IDEs, and OS