# Which Unreal Engine 4 project files can I ignore in source control?

I want to put an Unreal Engine 4 project under source control with git. (I know the editor has Perforce and Subversion support, but I don't care for those.)

What folder and files do I include in the repository and which can I ignore?

The way I see it, the following is needed: Config, Content, Source, *.sln, *.uproject

Things that I can ignore: Binaries, DerivedDataCache, Intermediate, Saved, *.suo, *.sdf, *.opensdf

Is this correct?

• If there's a .sln, there's usually a .vXX.suo file (which is invisible, usually) which you may want to ignore since it contains user-specific options. – user1430 Mar 21 '14 at 15:41
• Github maintains a list of ignore files for various projects. There is no entry for Unreal4 yet. If you find the perfect list, perhaps you should submit a pull request to add it there. – Seth Battin Mar 21 '14 at 17:28
• I already ignored the VS temporary files, but thank you for making it obvious to everybody. I amended the question to reflect that. – rioki Mar 25 '14 at 9:26
• @rioki What's your impression about working with git? Yesterday was the firs time I worked with UE and saving the simple level used 500mb of my hard disk space. It's too much data for git to sync. – user44748 Apr 18 '14 at 9:32

I'm using GitHub for Windows which generates a nice gitignore ignoring most extraneous files like log files or files specific to VS that don't need to be shared.

From what I can gather from this page in the Unreal docs, you can probably ignore these directories:

DerivedDataCache
Intermediate
Saved


I'm not going to ignore Binaries, if only because I'm working with a level designer who doesn't have VS and so will need the DLL files I build (I assume, I could be wrong).

Again keep in mind I'm using Git for Windows that generates gitignore for you when you create a project, and it's pretty big. I'm pretty much only committing the following (where "ReallyCoolGame" is the name of your project):

.gitattributes
.gitignore
Binaries
Config
Content
Source
ReallyCoolGame.sln
ReallyCoolGame.uproject


I've only just committed this myself, and I've yet to test it with my level designer, so caveat emptor.

Also, I'm referring to a project created using the first-person C++ template, which gets saved to: E:\Documents\Unreal Projects\ReallyCoolGame (My Documents == E:\Documents on my machine) and not within the Unreal Engine source directory structure.

Edit: I also don't want to include all the default content, so I'm going to have a subdirectory within Content just for the game assets themselves with the same name as the project, and ignore all other subdirectories of Content. So the lines at the top of my .gitignore now look like:

DerivedDataCache
Intermediate
Saved
Content/*
!Content/ReallyCoolGame


And the level designer will put all of our assets in Content/ReallyCoolGame instead.

UPDATE:

The Intermediate directory actually contains Visual Studio's project files, which are needed to build the project. If the Intermediate directory is ignored, you won't be able to build the project because the Visual Studio solution won't find it. But there are two easy workarounds for this.

1) Just don't ignore the Intermediate directory. Of course in that case Visual Studio will still find all project files it needs and be able to build the project.

2) This one is even better, especially for version control: Open your project in Unreal Engine 4 editor and go to "File > Refresh Visual Studio Project". This will generate an all new solution file for you, which means you won't even need to commit it and can add the *.sln in the project folder to the .gitignore file.

Also *.suo and *.sdf files can be ignored in general, since Visual Studio just generates new ones when you open your solution.

• I solved the issue with the default content differently. I did not add the starter content into the generated project. Building up the materials to get started is really a piece of cake and once it gets serious I will have my own assets. This removes something like 100 MB of files from the project. – rioki Mar 25 '14 at 9:21

I don’t know the differences between the public version of UE4 and mine, but here is the .gitignore file I have been using:

Engine/Binaries/
Engine/DerivedDataCache/
Engine/Intermediate/
Engine/Plugins/*/*/Binaries/
Engine/Plugins/*/*/Intermediate/
Engine/Programs/UnrealPak/
Engine/Saved/
Engine/Source/*/*/*/obj/
Engine/Source/*/*/obj/
Engine/Source/*/obj/

UE4.opensdf
UE4.sdf
UE4.sln
UE4.suo
UE4.*.suo

GameName/Binaries/
GameName/DerivedDataCache/
GameName/Intermediate/
GameName/Saved/

• You have your game project withing the source three of the UE? If you have a custom build of the engine this may make sense, but I am using the stock engine. Basically I just need the GameName/* and VS ignores. – rioki Mar 25 '14 at 9:24
• Yes, the engine needs a lot of modifications, and upstream UE is regularly merged into the repository. – sam hocevar Mar 25 '14 at 10:02
• FWIW, when I was working with UE3 we also had our game project within the core UE source tree, and my impression was that this is SOP. I'll almost guarantee that you'll need to do engine mods as well, and it's much easier to keep track of everything if you consider UE+Your Game as a single 'entity'. – Steven Stadnicki Apr 10 '14 at 17:16

This is what I have in my .gitignore

#Unreal Engine
StarterContent/
Saved/
Binaries/
Build/
Debug/
Intermediate/
DerivedDataCache/