Understand source code management
Source code management, explained
Source code management (SCM) systems are tools that help teams collaborate on and modify the source code repository (sometimes called a “repo”) of their projects. These tools work by tracking changes to a code repository over time.
Teams using source code management systems can work on the same project together simultaneously. Each individual change and update can be added to the source code repository in the form of a “commit,” which groups everything together. Changes grouped together in a single commit can be reviewed and updated individually, or the whole group can be undone. Having access to this complete history within the commit makes it easier to identify bugs, as well as to restore features that were previously removed.
What is version control?
Source code management, also referred to as version control, is how teams track and manage their projects’ code and asset updates. You can think of a source code management tool as the source of truth for the programmers, artists, and other team members who are contributing to your project’s codebase.
An effective version control system gives teams the ability to back up their projects at regular intervals and roll back to previous versions if unexpected events like merge conflicts occur. Merge conflicts happen when two different sets of changes are added to the source code simultaneously, and the version control system is unable to determine which one to merge into the project.
Source code management tools
It’s important to find the best source code management tool for your team and implement it at the right time. The ideal time to introduce new source control tools is at the start or end of a project. Implementing them can be challenging, as this potentially requires your whole team to adapt their existing workflows – a process that’s more challenging when a project is in full swing.
Wondering what to look for as you consider a new tool for source code management? Consider factors like the types of files and file sizes you’ll be working with, the technical prowess of your entire team, cost, security requirements, and how much flexibility your team needs.
Learn more about how to evaluate your next version control tool on the Unity blog.
Why source code management tools are important
There are many reasons to implement source code management as part of the game development process. The most obvious is having greater control over your project. Effective source code management software empowers everyone, regardless of technical expertise, to work on their own parts of a project independently, while also making it easy to undo any changes that unintentionally break the source code. This is achieved through branching.
A source code management tool that supports branching gives programmers the ability to isolate their own files from the main project (called the “trunk”) and test changes and updates on a separate “branch.” Once the changes are confirmed to be stable, they can then be merged back into the trunk.
Generally, source code management tools store information in the cloud or a distributed server, improving collaboration across time zones and geographies. These solutions also make it easier to work with larger project files, especially if they use file-based workflows. A file-based workflow allows team members such as artists to make changes to individual project files without downloading the entire project – a huge timesaver.
Unity's source code management solutions give you all of the benefits listed here. It is flexible and easy to use for programmers and artists, supports large repos and binary files, and works using a file-based workflow. Unity source code management can support thousands of branches concurrently and is the only version control that offers visual branching.
Explore more resources to learn about version control systems and other DevOps tools and processes.