github/gitignore · UnrealEngine.gitignore
Unreal Engine .gitignore Template Explained
Why UnrealEngine.gitignore ignores Binaries, Intermediate, Saved, DerivedDataCache and generated solution files, and how the negation rules for the Build folder work.
UnrealEngine.gitignore is a template for Unreal Engine C++ projects. It excludes the large folders the engine creates for compilation, cooking and shader caches, and the IDE project files that the editor can regenerate.
The five lines dealing with the Build/ folder are a good illustration of gitignore precedence. They exclude all the folder's contents but restore the per-platform subfolders, and inside them re-include only the icon and PakBlacklist files.
Rules explained
| Pattern | What it ignores and why |
|---|---|
Binaries/*Intermediate/*Saved/*DerivedDataCache/* | Engine-generated foldersCompiled modules, intermediate build files, logs, autosaves and config caches, and derived shader and asset data. The editor or the build recreates all of them. |
Plugins/**/Binaries/*Plugins/**/Intermediate/* | Plugin build outputProject plugins also create their own Binaries and Intermediate folders. ** matches plugins at any depth. |
Build/*!Build/*/Build/*/**!Build/*/PakBlacklist*.txt!Build/**/*.ico | Build folder exception structureBuild/* excludes the contents and !Build/*/ restores the subdirectories. The directories must stay alive so that everything can be excluded again with Build/*/** and then only the PakBlacklist and icon files re-included with !. This works around the rule that files cannot be restored once their parent directory is excluded. |
*.sln*.suo*.xcodeproj*.xcworkspace.vs/.vsconfig | Generated IDE projectsVisual Studio and Xcode files that can be regenerated at any time from the .uproject with 'Generate Project Files'. |
*.obj*.o*.pch*.dll*.lib*.exe*.app*.ipa | Compilation outputC++ compile and link results and packaging output. |
*_BuiltData.uasset | Built lighting dataPer-map data produced by building lighting. It is large, changes often and can be rebuilt. |
SourceArt/**/*.pngSourceArt/**/*.tga | Source artA rule to keep the folder of original, pre-import textures out of the repository. To version the originals, remove it and use Git LFS. |
Practical notes
- Tracking binary assets such as
.uassetand.umapwith Git LFS is practically mandatory. Config/,Content/,Source/and.uprojectshould be committed. Settings inSaved/Configare personal, so it is correct that they are excluded.- Before changing the
Build/structure, put a path such asBuild/Windows/Application.icointo the pattern tester and check the result.
Original template
UnrealEngine.gitignore
# Visual Studio 2015 user specific files.vs/# Compiled Object files*.slo*.lo*.o*.obj# Precompiled Headers*.gch*.pch# Compiled Dynamic libraries*.so*.dylib*.dll# Fortran module files*.mod# Compiled Static libraries*.lai*.la*.a*.lib# Executables*.exe*.out*.app*.ipa# These project files can be generated by the engine*.xcodeproj*.xcworkspace*.sln*.suo*.opensdf*.sdf*.VC.db*.VC.opendb.vsconfig# Precompiled AssetsSourceArt/**/*.pngSourceArt/**/*.tga# Binary FilesBinaries/*Plugins/**/Binaries/*# BuildsBuild/*# Whitelist PakBlacklist-<BuildConfiguration>.txt files!Build/*/Build/*/**!Build/*/PakBlacklist*.txt# Don't ignore icon files in Build!Build/**/*.ico# Built data for maps*_BuiltData.uasset# Configuration files generated by the EditorSaved/*# Compiled source files for the engine to useIntermediate/*Plugins/**/Intermediate/*# Cache files for the editor to useDerivedDataCache/*
Templates from github/gitignore/UnrealEngine.gitignore @356fd7b (2026-09-11) · CC0-1.0