Hello there! We are conducting a survey to better understand the user experience in making a first edit. If you have ever made an edit on Gamepedia, please fill out the survey. Thank you!
Using a Version Control System
Requirements[edit | edit source]
Definitions[edit | edit source]
- 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 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 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 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[edit | edit source]
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[edit | edit source]
Guide[edit | edit source]
Open up the root folder of your mod (i.e.
Squad\Squad\Plugins\Mods\<mod_name>), 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:
<your_username>@<your_hostname> MINGW64 /<path_to_SDK>/Squad/Squad/Plugins/Mods/<mod_name>
To begin, lets verify that we have Git and Git-LFS installed and working. Type
git version and hit enter. If it returns something similar to this:
git version 2.15.1.windows.2 then you have it installed correctly.
Let's continue by checking Git-LFS:
git lfs version, which should return something similar to this:
git-lfs/2.3.4 (GitHub; windows amd64; go 1.8.3; git d2f6752f).
Initial Setup[edit | edit source]
To create a new git repository within your mod root folder, execute the following commands in order:
git init .
git lfs install
git lfs track *.umap
git add .
git commit -m "Init Commit"
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[edit | edit source]
Guide[edit | edit source]
Commiting a Change[edit | edit source]
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[edit | edit source]
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[edit | edit source]
Left click on the "Publish repository" button at the top of the client, then fill out the form.