While developing a game, you don’t want experimental changes, fixes, or half-finished ideas to immediately affect the overall project. Creating multiple branches lets you and your teammates work safely together or independently without slowing down overall project progress.
Branches are parallel versions of the main project that move forward at different speeds and for different purposes.
A project might need to support several kinds of work simultaneously. Creating and managing branches make this possible by letting each kind of workstream live on its own path, and only merging them when you're ready. There are different branching strategies that teams use for different reasons, but one common paradigm leverages the following:
Main Branch: A stable, long-running branch that acts as a foundation for the project.
Release Branch: Branches where work is tested and prepared for a specific release.
Feature Branch: Focused branches where feature work takes place ahead of being integrated into a release branch or
main.Experimental Branch: Branches where exploration can take place safely without affecting the entire project or other branches.
Main Branch
The main branch is the most stable version of a project because it’s the shared and reliable baseline all other branches stem from and flow back to.
A main branch is used to:
Integrate another branch when the work is ready.
Iterate to create a stable build for playtests.
Create a dev branch that follows the main branch. The dev branch is where you can test the stability of work before merging with main.
Release Branch
Release branches are where work is locked down while preparing a build for testing or release. A release branch is a great way to organize work around a particular release goal or timeline.
A release branch is used to:
Freeze features to release specific work.
Focus on bug fixes and polish.
Avoid last-minute changes and scope creep.
Separating the release work into its own branch is especially valuable late in development because:
Experimental work can continue without causing issues for the team.
Changes are not permanent to the overall project, which could result in delays.
The team always knows what's going into a release.
Feature Branches
A feature branch is used for in-flight feature work without introducing risk to the release or main branches. There can be many feature branches where teammates make changes freely without breaking other project branches.
Feature branches are created for work on a specific task, such as:
Adding a new gameplay system.
Building a UI flow.
Adding a new section of the map.
Feature branches are helpful for:
Grouping and reviewing feature work.
Switching between in-progress features and other work without losing your place or muddying your active workspace with disparate changes.
If you decide to go a different direction, the feature branch can be easily abandoned without affecting anyone else.
Feature branches are easily abandoned without affecting another teammate or work in progress.
Experimental Branches
An experimental branch is the place where new ideas are explored safely without interrupting another team member’s work. After exploring an idea, you can compare results and decide what to keep. If an idea works, you can merge the changes. If it doesn’t work out, then the branch can be deleted or abandoned.
Experimental branches are used in the following ways:
Prototyping gameplay ideas.
Trying performance optimizations.
Exploring alternate art or level layouts.