1
\$\begingroup\$

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

\$\endgroup\$

2 Answers 2

1
\$\begingroup\$

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:

  • Make sure your file is tracked/ added
  • Change your file
  • Save it
  • Add to staging area
  • Write your commit message
  • 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.

\$\endgroup\$
1
  • \$\begingroup\$ 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. \$\endgroup\$ Commented Jan 23, 2019 at 18:53
1
\$\begingroup\$

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.
  5. Run via Debug / Start Without Debugging.

Observed vs. expected:

  • The project editor ran, but showed the default "minimal default" starter content map without my changes, whereas I expected to see what I'd pushed into git. All else looked fine, e.g. my classes, materials, blueprints, etc. were all there.

To fix:

  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.

I ran through the duplication steps again, this time checking the git status after each one. At least in my case, the culprit was duplication step 5. The git status was clean until I ran the project.

Hope that helps someone who was about to punt their keyboard. Alas, mine wasn't so lucky.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .