Problem with .gitignore in UE4 project

Hi guys,

my team is using Git for version control and we’re finding it hard to properly push the cody to the repository. The .gitignore we are using is based on this thread and when we try to load the project in Visual Studio we get the following error: “the project file or web cannot be found”. Then, when we try to build it: “…\Intermediate\ProjectFiles.vcxproj has been moved, renamed or is not on your computer”. So, how do I properly configure .gitignore for UE4 projects?

Thanks in advance!

1 Like

You should avoid pushing VS project files as they are configured individually just for your to your UE4 installation.

All you need in git is Config, Content and Source directories and uproject file, everything else should be ignored or else you really need it. Heres my .gitignore

Binaries/
Intermediate/
Saved/
ProjectName.opensdf
ProjectName.sdf
ProjectName.sln
ProjectName.v12.suo

Intermediate is stuff generated specially just for you and will work only for you, Saved contains your personal editor configuration and backups, Binaries is kind of obviues they should not be in git. Other ignored files are VS project related stuff.

Now you may ask how to generate project files after cloning if you need to compile code first to run editor? Right click uproject file and click “Generate Visual Studio Files” and project file for you will be generated :slight_smile:

1 Like

I’ve never seen *.opensdf before. Is this a fileformat from Visual Studio? Or an from an Open Source IDE?

Hi Robert42,

The .opensdf file is a temporary file that is created whenever a solution is opened in Visual Studio. However, it is only created if a corresponding .sdf file is included. Unreal Engine 4 projects do not create a .sdf file by default.