Git workflow

How use Git to coordinate on product module updates

Overview

Building a product module on Root often requires multiple builders working on the same codebase. We use Git and GitHub to manage collaboration and version control.

We always follow these core principles when collaborating on product module development using Git:

  1. The main branch should always match the latest major (live) product module version . Whenever changes are merged into main, the main branch must be deployed by a Root team member to create a new live product module definition (major version).
  2. Branches should be feature specific and follow this naming convention: <author-name>/<description>
$ git checkout -b peter/feature-quote-validation
  1. Pull requests should be thoroughly reviewed and tested before being merged into main.

Read more about the live (major) and draft (minor) versions of a product module in the Product modules overview guide.

Gitflow workflow

The Gitflow workflow works well for product module development. A full guide can be found here.
We use the Gitflow workflow as follows:

  1. A single develop branch is created from main.
  2. One or more feature branches are created from develop. This allows multiple developers to work on different branches.
  3. When a feature branch is ready it is merged into the develop branch for testing.
  4. When the develop branch is ready (all features merged and tested, PR reviewed and approved) it is merged into main. The main branch must now be deployed by a Root team member.
  5. If an issue is detected in main, a hotfix branch is created from main
  6. Once the hotfix is complete (tested and PR reviewed) it is merged to both develop and main. The main branch must now be deployed by a Root team member.
1191

A visual representation for the Gitflow workflow from the aforementioned guide