Using a Version Control System

=Requirements=
 * Squad SDK
 * Git
 * Git-LFS
 * GitHub Desktop
 * Completion of the steps detailed in Creating a Mod

=Definitions= What is..?
 * Version Control System
 * A Version Control System (VCS) is a system that records changes to a file or set of files over time so that you can recall specific versions later


 * Git
 * Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency


 * Git-LFS
 * Git Large File Storage (LFS) replaces large files such as Unreal Engine levels, assets, saves, and materials with text pointers inside Git, while storing the file contents on a remote server like GitHub.com


 * GitHub
 * GitHub is a Web-based Git version control repository hosting service. It hosts the SquadMods Git Organization, and supports Git-LFS, making it uniquely suited for Squad mod development


 * GitHub Desktop
 * GitHub Desktop is a Graphical Git Client that integrates with the GitHub webservice

=Unreal Engine Source Control= Unreal Engine as of version 7.4 ships with a Source Control plugin by default. It is intended for full project source control only, and is not suitable for mod development. Do not use it.

=Git/Git-LFS=

Guide


Open up the root folder of your mod (i.e. ), right click within the folder (but not on a file), and left click on "Git Bash Here" context menu option.

You should see something similar to this:

To begin, lets verify that we have Git and Git-LFS installed and working. Type  and hit enter. If it returns something similar to this:

then you have it installed correctly.

Let's continue by checking Git-LFS:, which should return something similar to this:

.

Initial Setup
To create a new git repository within your mod root folder, execute the following commands in order:



Congratulations! You have, in order, created a git repo in the root directory of your mod, installed the LFS git hooks, told LFS to track all .umap files, added the files within your mod to the repo, and commited your changes to the VCS.

Now that you have completed the process of establish your working directory, you can now manage it and use it to backup your mod files. While you can do this with the Command Line Interface (CLi) client, it is far easier and safer to use a Graphical User Interface (GUI) client. Which brings us to...

=GitHub Desktop=

Commiting a Change


To commit a change, open the GitHub Desktop client, verify that your changed files are listed on the left, write a short summary and description of your change, then left click "Commit to master".

Reverting a Change


To revert to a previous commit, left click on the "History" tab on the left hand panel, right click on the commited change you want to revert to, and left click on "Revert to this commit".

Uploading to GitHub


Left click on the "Publish repository" button at the top of the client, then fill out the form.