Skip to main content

Using Git Source Control In Unreal Engine

πŸšͺ Prerequisite Knowledge

  1. Unreal Engine 5Git FullyPlugin Installed withπŸ“Ž allInstalling it'sGit developmentSource dependenciesControl πŸ“Žin Unreal Engine 5 Installation
  2. Git
LFS is installed. πŸ“Ž Git LFS

❓ Key Question / Problem / Issue

  1. How to Installuse &git Setupplugin Sourcein ControlUnreal
  2. on
  3. How to avoid Conflicting change
  4. How to Lock file from other people changes
  5. How to Merge multiple branch in Git Unreal Engine
  6. 5
Project?

βœ… Expected Output/Definition of Done

Reader able to setup Git Source Control in Unreal Engine 5

🎁 Resulting Solution

Ensure your Git Source Control Plugin are Active

active source control

if your source control is not yet activated follow this guide

Source Control Icons Explanation

If source control is fully connected, you may seen various icon on top-right of the assets. Here is the icon shapes and its descriptions as you can see at the image below.

Untitled

Adding Files

To start adding file to source control simply follow these steps :

Ensure to Pull / Refresh the latest changes before Adding, Modifying, Renaming, Deleting any assets

  1. Create / Add / Import File you want to distribute through source control

    Untracked File

    Files will be marked with yellow ? symbol when added

  2. Select file(s) / folder(s) you want to add select file to add

  3. Right-click then select Mark For Add menu Mark For Add File Mark for Add folder

  4. your file will be then marked with Red + symbol File Added

  5. Submit your added content following guide at Submit Content Section

Checking-out and Modifying (Locking) Files

The main way to share content with collaborators is via the Content Browser. All source control operations are accessible via the context menu for files and folders.

Manual Check Out

To Check Out a file (i.e. lock it for editing), Right-click on the asset and then select the Check Out option.

Untitled

Prompted Check Out

  1. When you edit asset, there’s pop a notification to check out these asset.

  2. click the Check-out link, then you will be presented with this dialog: Untitled

  3. Select one of the three button (check the descriptions of each button below) Untitled

    Avoid selecting Make Writable as it would save your change without locking the file, nor marks it as written file.

    Only use this when you know what you are doing !

  4. If you select Check Out Selected button, Icon would be added to your asset thumbnail Untitled

    And would be there till you push the asset (check-in) or discard (revert) your changes.

Deleting files

If you delete any file, you would see the Delete Assets dialog.

It will tell you the asset data, like name, class and refferences of the file you delete.

if you are sure to delete the files, select Force Delete button.

Untitled

Deleted File will also be checked out automatically

You should also submit file deletion changes to the source control

Untitled

(Optional) Automatically Check Out File on Save

you can set the editor to automatically check out files on save by enabling Prompt for Checkout on Asset Modification.

to enable this you need to follow the following steps :

  1. Open Editor Preferences Untitled
  2. Click on Loading & Saving scroll to Source Control. Untitled

Submitting Content to Source Control

Submitting to Source Control in Unreal Engine is a vital part of the Source Control process. If you do not submit anything to Source Control, other users will not be able to see what you have been working on or created.

To submit all checked out asset follow these following steps :

  1. go to Source Control at the bottom-right of UE editor

  2. Press Submit Content.

    Untitled

    This will scan your project and the Engine for changes made to assets that can be submitted and then present you with the Submit Files dialog.

    Untitled

  3. Fill the change list description (it will be a message commit) and Submit.

  4. Once you submit it, all of related assets (checked out or new file) and its checked would be committed and pushed to the repository.

Additional Source Control Commands

When using right-click on a single (or multiple) file

  • Check Out Lock file(s) so other user can’t check-out, useful to prevent conflict. It’s advisable to Check Out file before editing/working on it.
  • Check In Submit (Commit & Push) selected file(s), also Unlock the file from Git-LFS
  • Sync Synchronize (Pull) selected file(s). If the file(s) is referenced by other files, the referencing files will be synchronized too.
  • Refresh Refresh the current file status/icon
  • History Show the changes made to this file. Right click on any history item to show popup menu to see changes between selected commit with previous commit or current working file
  • Diff Against Depot See side by side differences between current working file and last committed one.
  • Revert Discard changes and unlock file

Unreal Engine Git Usage Basics

  1. Always Pull any latest Change Before change things / Checkout
  2. Always Check Out file you've changed.
  3. Always Pull Before Submitting Changes