User:Rocode/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
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...