Be careful about where you set up your git repo

In case anyone did what I did and selected the interior BuildingEscape folder when creating a repo in SourceTree, what that means in this lesson is that your gitignore is going to be slightly different.
I had to mess around with it before I figured out why, so hopefully this might save someone else some time and frustration!
By telling git my repo is actually in the BuildingEscape folder, my .gitignore does not have items that start with */ like in the video:


Instead those folders are all on the same level as the gitignore file so it looks like this:


Hope this helps :slight_smile:

P.S. Does anyone know if it there is a reason we shouldn’t also ignore the BuildingEscape.VC.VC.opendb file that VS creates while it has the project open?



It seem Ben advocates closing the project before making a commit, so I guess the file has cleaned itself up by that stage?..
Could see any reason why couldn’t be ignored though if you are making a commit with VS / UE open?

The docs for .gitignore.

Note, the only differences between */Binaries and Binaries/ are:

  1. */Binaries never matches /Binaries and only matches files or directories in not at the root directory.
  2. Binaries/ never matches files or symlinks and only matches directories, whether they are at the root or not.

/*/Binaries/ only matches directories called ‘Binaries’ that are one directory removed from the root directory, rather than matching at any level.

Correct. If you want at all levels you need


**/Binaries/ is the same as Binaries/.

The opendb files could optionally go in the .gitignore for safety, but they (“should”) disappear when you close Unreal and Visual Studio (which the videos recommend doing before committing). But both belt and suspenders don’t hurt so it’s fine to put *.opendb in the .gitignore.

Really? Learn something new every day.

Thank you for the heads up!

Privacy & Terms