Skip to content

UE Source Control

Kelly Carino edited this page Nov 22, 2023 · 11 revisions

Unreal Engine Source Control

We'll be using Unreal Engine's Source Control to handle checking out different files we're working on. This should prevent people working on the same files to avoid any merge conflicts!

PLEASE READ THIS FIRST: Setup


Prerequisites

  • Each member working in the project will need to set this up on their local machine
  • Ensure that Git is installed on your system. If not, download and install it from Git's official website.
  • Ensure you have access to the WinterJam repository

In the Unreal Editor, click on Source Control on the bottom-right of the editor and click on Connect to Source Control

Screenshot 2023-11-22 043032

In the prompt, select Git (beta version) as the Provider, confirm the Git Path points to the correct path, confirm the rest of the information is correct (specific to you). Finally, click on Accept Settings

Screenshot 2023-11-22 043453

You can adjust any Source Control settings in your Editor Preferences > Loading & Savings section

Screenshot 2023-11-22 043736

Adding a new file

If you added a new file, you'll see a red plus in the top-right corner of the asset that will be added

Screenshot 2023-11-22 032847

You have the option to commit the file from the Unreal Editor at the bottom-right corner of the editor

Screenshot 2023-11-22 032927

You'll be prompted to add a description/commit message

Screenshot 2023-11-22 032949

Once you click Submit, you'll see a message that it was committed to your branch

Screenshot 2023-11-22 032957

You can confirm this by looking in the history in the GitHub Desktop UI > History

Screenshot 2023-11-22 033040

NOTE: You don't have to commit anything in the Unreal Editor if you prefer using the GitHub Desktop UI since this will still show up as a new file

File checked out by you

You'll see a red checkmark in the top-right corner of the file if you've made any modifications to the file

Screenshot 2023-11-22 033142

You can either commit this change in the Unreal Editor or use the GitHub Desktop UI. Below is an example of the change in the GitHub Desktop UI

Screenshot 2023-11-22 033236

Checking the diff

You can check to see what you've changed in the file by right-clicking on an asset and clicking on Diff Against Depot

Screenshot 2023-11-22 035014

The areas changed are in yellow text on the left. Selecting this will display the diff

Screenshot 2023-11-22 035037

Revert changes

You can also revert changes by right-clicking on the asset and selecting Source Control > Revert

Screenshot 2023-11-22 035612

This will open a prompt to select any files you want to revert

Screenshot 2023-11-22 035624

The asset should update by removing any status icons from the top-right corner

Screenshot 2023-11-22 035637

Status Icons

Screenshot 2023-11-22 032751

More info here