Author: Chauncey Mac

version control is tricky for game development, especially with all of the binary files. This is the solution we found works for us. We use git with git-lfs for the binary files. We store these in Microsoft’s Azure DevOps, which doesn’t have a hard limit when it comes to repo sizes. This setup is totally free, and even allows branch protections.

Set Up

Note: This assumes you have basic knowledge with git. If not, please read version control.

  1. Open your game project directory and initialize the git repository. Then make sure git-lfs is installed on the system.
git init
git lfs install
  1. Create a .gitignore file and insert the following. (This will ignore files that aren’t required for version control)
# Visual Studio 2015 user specific files
.vs/
.vscode/
 
# JetBrains
.idea/
 
# Compiled Object files
*.slo
*.lo
*.o
*.obj
 
# Precompiled Headers
*.gch
*.pch
 
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
 
# Fortran module files
*.mod
 
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
 
# Executables
*.exe
*.out
*.app
*.ipa
 
# These project files can be generated by the engine
*.xcodeproj
*.xcworkspace
*.sln
*.suo
*.opensdf
*.sdf
*.VC.db
*.VC.opendb
 
# Precompiled Assets
SourceArt/**/*.png
SourceArt/**/*.tga
 
# Binary Files
Binaries/*
Plugins/*/Binaries/*
 
# Builds
Build/*
 
# Whitelist PakBlacklist-<BuildConfiguration>.txt files
!Build/*/
Build/*/**
!Build/*/PakBlacklist*.txt
 
# Don't ignore icon files in Build
!Build/**/*.ico
 
# Built data for maps
*_BuiltData.uasset
 
# Configuration files generated by the Editor
Saved/*
 
# Compiled source files for the engine to use
Intermediate/*
Plugins/*/Intermediate/*
 
# Cache files for the editor to use
DerivedDataCache/*
 
# Linux
Makefile
  1. Create a .gitattributes file and insert the following. (This will setup tracking for git-lfs. Feel free to add more file types.)
# UE file types
*.uasset filter=lfs diff=lfs merge=lfs -text
*.umap filter=lfs diff=lfs merge=lfs -text
 
# Raw Content types
*.fbx filter=lfs diff=lfs merge=lfs -text
*.3ds filter=lfs diff=lfs merge=lfs -text
*.psd filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.mp3 filter=lfs diff=lfs merge=lfs -text
*.wav filter=lfs diff=lfs merge=lfs -text
*.xcf filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
  1. Create an account and project with Azure DevOps.
  2. Go to the Repo Page and follow the instructions.
    • Something like: git remote add origin https://<TEAM>@dev.azure.com/<PROJECT>
    • Azure DevOps only supports git-lfs over https, so sadly SSH can’t be used.
    • Then: git push -u origin --all
  3. Set up Branch Structure or just use the main branch.

Branch Structure

From here feel free to create your branch structure and branch protections, or follow ours.

  • main
    • Stable branch which builds are made from.
    • Eventually plan to create a pipeline that will automatically build the executable.
  • staging (from main)
    • Stable branch that includes latest features.
  • dev (from staging)
    • Unstable branch that includes features currently being worked on.
    • Feature branches are created off dev and then merged up.

pushing updates to version control

Alternatives

If Azure DevOps updates to add a hard cap on storage or the whole platform is killed off in favor of github enterprise then a migration will have to take place. A custom solution like this seems the most feasible. https://www.vaslabs.io/post/migrating-from-gitlab-lfs-to-s3-to-save-money or https://github.com/awslabs/git-remote-s3

There are dedicated solutions out there like Perforce which offer free plans for small teams, but you have to host it yourself. This isn’t ideal for us because we are just doing this as a hobby, so the time sink to setting this up isn’t worth it.