Skip to main content
Branching Strategy
Support avatar
Written by Support
Updated yesterday

Salto’s branching strategy provides a framework for managing configuration and streamlining deployments using Git. This strategy is designed to support collaboration, maintain environment consistency, and simplify the promotion of changes across environments. Here’s how it works:

  1. Branch Per Environment in a Unified Repository:
    Each release pipeline (e.g., Dev → UAT → Prod) is mapped to a single Git repository. Within this repository, every environment has its own dedicated branch that reflects the latest configuration for that environment.

  2. Deployment Feature Branches & Pull Requests:
    When deployment pull requests (PRs) are enabled for an environment, Salto ensures that each deployment is tied to a corresponding feature branch and PR. Feature branches always originate from the target environment’s branch. For example, if your deployment targets the UAT environment, the feature branch will be initiated from the UAT branch.

    This approach ensures that your work takes into consideration any pending changes already in your release pipeline on their way to production, which will be deployed before or along with your changes.

    This has multiple advantages:

    • Your changes are tested and integrated with other changes expected to be in production, making tests more meaningful.

    • Fewer merge conflicts are encountered up the pipeline when attempting to patch your changes on a newer version

    • It aligns with trunk-based software development principles, where developers start from the latest commit on the trunk, even if some of those commits include features that haven't been deployed to production yet.

    • It promotes better alignment between pipeline environments, encouraging teams to regularly advance (or clean up) features in the pipeline.

  3. Promotion to the Next Environment:
    Changes deployed to one environment can be easily promoted to a higher environment. It is recommended that multiple deployments be promoted together. This allows teams to set a release process that pushes all recent features to production. A Salto promotion behaves like any other deployment from the branching and PR aspects of it, meaning:

    • Salto will create a feature branch from the environment branch

    • Translates the promoted deployment changes to commits and push them to this feature branch.

    • Create a pull request which will be merged into the environment branch upon deployment

  4. Conflict Resolution:
    Conflicts may occur during deployments or promotions. Salto’s conflict resolution tool helps resolve these efficiently. Learn more

Prefer to base your feature branches on the production branch (e.g., main)?

You can attach a secondary Git branch to your Salto environment via its settings page, allowing you to open PRs targeting that branch instead.

Did this answer your question?