Backing Git Branch

A Stack is linked to a Remote Git Repository. A backing Git branch is simply a branch in this repository this is used to track the metadata of a particular Environment. The environment record serves as a link between the backing Git branch and the Salesforce organisation which it backs.

The metadata in a Salesforce organisation can be committed to the backing Git branch with the env:flowin command (Flow In ). And the metadata in the backing Git branch can be deployed to a Salesforce organisation with the env:flowout command (Flow Out ).

tip icon
tip

The env:flowin command is no the only way that you can change the metadata in a backing Git branch.

You can change any of the metadata files either directly in this branch by cloning it, making the required changes, and then pushing the changes back up to the remote Git Repository. You can also merge changes from other branches (either with the Git merge command or via a Pull Request).

OrgFlow is able to track changes made in both your Salesforce organisation and your backing Git branch independently, and it is able to merge those changes using the env:flowin command.

Creating a backing Git branch

By default, the backing Git branch is created by the env:create command. The branch will be created from the HEAD of the branch that backs the source environment used by that command (by default this will be the Production Environment, but this can be changed by the options available on that command).

You can avoid this default functionality by manually creating the backing Git branch in the remote Git repository before running the env:create command. See the env:create command documentation for details on how to do this.

Switching a backing Git branch

OrgFlow allows you to change an environment's backing Git branch. See Branch Switching or env:branch:switch for more details.