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.

Open in generator Open with VisualStudio, Windows, macOS, C++

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

PatternWhat 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/**/*.icoBuild 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/.vsconfigGenerated 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*.ipaCompilation outputC++ compile and link results and packaging output.
*_BuiltData.uassetBuilt lighting dataPer-map data produced by building lighting. It is large, changes often and can be rebuilt.
SourceArt/**/*.pngSourceArt/**/*.tgaSource 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

Original template

UnrealEngine.gitignore42 rules
# 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

Often used together

More template explanations