# How to get an Unreal Engine 4 Level to sync using Git Source Control?

Hello Game Development Stack Exchange,

I and a couple of collaborators are working on an Unreal Engine project, we do not share a common network, which meant that using a local network storage to hold the data wasn't plausible.

I discovered that Unreal Engine allows Source Control through Git services, so I created a private repository on GitLab that all Collaborators have access to.

Inside of Unreal Engine, I created a Project with the Minimal C++ with Starter Content, edited the 'Minimal_Default' map a little bit, inserted some new assets, placed them on the map. Made sure all my needed asset information was being checked-in to Source Control, saved everything, then Submitted to Source Control, named the commit, then committed locally.

Now outside of Unreal Engine, using TortoiseGit for Windows I pushed the commit to the GitLab repository, all the necessary files were uploaded. However, when I cloned the same repository to another machine, and opening (with the same exact engine version), the 'Minimal_Default' map was the original, not the updated one. The assets I imported are inside of the Content Browser, but the assets are not placed around the level as I did to the commit.

So, my question states, how do I get the 'Minimal_Default' level to be committed and opened when the Git repo is cloned? Am I missing something in Unreal Engine, Pushing, or something else?

All help would be greatly appreciated.

Sincerely, Shejan Shuza

Remember to stage the changes of the map inside your commit

Even if Sourcetree is marking your files as modified (checked-in) you still have to add your file inside your commit (aka stage the modified file).

Also after you commit some changes, you need to push them to the remote (usually origin).

A complete workflow would look like this:

• Save it
• Commit locally
• Push to remote

Others have to fetch the origin and pull to get your changes.

If this does not solve your problem, please do share a photo of the commit itself, so we can see what's going on.

• Because git is terrible at binary data it's also possible that Unreal sets a .gitignore property to skip map data, then any "git add..." would not include your change by default. I'll have to check on that, my environment is down right now. Jan 23 '19 at 18:53

I has a similar issue.

To duplicate the problem:

1. Create a clean git clone of my Unreal (v4.23) project onto a Windows 2010 machine.
2. Browse to the *.uproject file, right-click, Generate Visual Studio project files.
3. Open the resulting *.sln file using Visual Studio 2019 (v16.3.3).
4. Build the project's default configuration via Build / Build Solution.
1. Run git status in your cloned repository. In my case, there were differences under the Content/StarterContent directory, specifically with the Maps/Minimal_Default.umap and some Architecture/*.uasset files I'd changed.
2. Use git's suggestion for discarding changes in the working directory, e.g. git checkout -- <file>... listing each unexpectedly modified file.