How to set up a .gitignore for Unreal Engine

Configure .gitignore for Unreal Engine project to avoid uploading unnecessary files. Download our template and customize it for your needs.

Matthäus Niedoba
15 Dec 2023
Updated on
11 Feb 2026
4
min read
Content

TLDR: Why do you need an Unreal Engine .gitignore?

  • Prevent Bloat: Automatically excludes Intermediate, Saved, and DerivedDataCache folders to save storage space.
  • 100% Git Compatible: Works with any Git server, including GitHub or self-hosted solutions.
  • Reduces Support Effort: Minimizes friction for artists by ensuring they only see relevant project files.
  • Fail-Safe Pipeline: Automates asset management and prevents human errors during the "checkpoint" (Git commit) process.

A .gitignore file is a crucial component for managing your Unreal Engine project with Git. It is a set of rules that tell Git which files to exclude from version control. A .gitignore has to be configured based on the game engine you use. We also have a .gitignore template for Unity.

Why do you need a .gitignore?

Without it you would upload too many unnecessary files into your repository. Files in folders like DerivedDataCache, Intermediate, Saved, and Build are generated locally during your work and clutter up your repository if included. By excluding these from version control, your repository stays clean and efficient.

gitignore in Anchorpoint
Using a .gitignore file will remove unnecessary files from version control

Use this example and add it to your Unreal Engine project

Download this .gitignore file and paste it to the root folder of your project. When you open it, you will see a set of rules that are specific to Unreal Engine. A .gitignore file for a Unity or a Godot project will look differently.

.gitignore in your project
Paste this .gitignore file in your Unreal Engine project

Share the .gitignore file with your team

The rules in the .gitignore file should apply to everyone on your team. Therefore, the next step is to commit and push it to the repository. Afterwards, everyone should pull your commit containing the .gitignore file. In most cases, you won't need to modify it further.

pushing a gitignore
The .gitignore file needs to be pushed to your repository
Anchorpoint is a version control solution used by over 200 studios worldwide that automates your Unreal Engine gitignore configuration to maintain a high-quality, professional asset pipeline.

Customizing your .gitignore

If you have specific requirements, you can tailor your .gitignore file accordingly. For example, some people choose to ignore the plugins folder and use Git submodules instead, while others may not. To customize, simply use a text editor to add rules. Each rule is defined by a pattern, which includes the following symbols:

                                                                                                                                                                                                                                                                                                                                                                                                                               
PatternDescription
character.pngIgnores all files that are named “character.png”
/character.pngIgnores all files in the project root that are named “character.png”
*.pngIgnores all PNG files
Build/Ignores the Build folder, only if it’s in the root of your project
*/BuildIgnores the Build folder only, if it’s in a subfolder
**/BuildIgnores the Build folder, regardless where it is in the project. This is useful when your Git repository has a subfolder (e.g. called Unreal) where your Unreal Engine project is located.
Build/*/file.txtIgnores the file.txt if it’s inside a subfolder of the build folder. E.g. Build/something/file.txt
!*.pngInclude all PNG files, even if they have been ignored before
!Build/file.txtInclude file.txt, even if the Build folder is ignored

By adding an exclamation mark "!", you allow files and folders to be included, even if they were previously ignored.

Adding files to a .gitignore, that already have been committed

If you already committed wrong files, that should be on a .gitignore, you need to follow these steps:

  1. Add them to the .gitignore file
  2. Remove them from the Git version history using the Git command "git rm --cached <file_path>".
  3. Then, you need to commit and push your changes, even if the commit is empty and has no files

Just adding the file to the .gitignore won't be enough, because you have to remove that file from the Git history. If you are unfamiliar with the terminal, you can just launch it from your project folder.

// use this for files
git rm --cached pathToMyFile
//use this for  
git rm -r --cached pathToMyFolder
Git remove files from history and add them on gitignore
In Windows Explorer, type in "cmd" in your title and press enter. Then, enter the Git command.

Adding a local (personal) .gitignore

If you need a personal .gitignore that isn't shared with the team, you can use a special file located in the hidden ".git" folder. Inside this folder, navigate to the "info" directory. Here, you'll find a file named "exclude". You can modify this file using the same rules as .gitignore, but the key difference is that these rules will only apply to your local environment and won't be shared with your team.

local gitignore file
The exclude file can be opened with a text editor and adjusted with the same rules like the .gitignore file

Git for artists

Compatible with GitHub, simple enough for non coders and optimized for game development.
Learn about Anchorpoint

FAQ

Why do I need an Unreal Engine gitignore file? 

In game development, Unreal Engine generates many temporary files (like shaders and local logs) that are unique to your computer. Including these in your version control causes merge conflicts and wastes space. 

What is the most common mistake when setting up a .gitignore? 

The most common mistake is pushing files before setting up the Unreal Engine gitignore file. Since Git requires your local repository to be up to date before pushing, it is best to configure your ignore rules at the very beginning of the project to keep the pipeline clean.

How does Anchorpoint handle large binary assets in Unreal? 

Anchorpoint is 100% compatible with Git and simplifies the handling of binary files (like textures and 3D models) without requiring complex manual configuration. It also features a file locking system that can lock 1,000 files in under a second to prevent artists from overwriting each other's work.

Where to learn more