Skip to main content
Protecting the Environment Branches in Git
Kirk DeBaets avatar
Written by Kirk DeBaets
Updated over a week ago

When deployment pull requests are enabled, Salto enforces the status of the linked pull request, preventing deployments unless the pull request is mergeable in Git. To ensure this process aligns with your requirements, it is strongly recommended to establish appropriate branch protection rules for your environment branches. These rules might include:

  • Requiring approval from n reviewers before deployment.

  • Automatically revoking approvals if changes are made to the pull request.

  • Running automated tests or other validations as part of the pipeline. Learn more

Which Branches Require Protection?

The branches that need protection in Git are the long-lived branches linked to your environments during the Git integration process.

If your Salto organization was created before December 2nd, 2024, the branches requiring protection may not include the environment branches directly. For more information, please refer to this article If you’d like to upgrade your Salto organization to adopt the new branching strategy, please contact our support team for assistance.

Step-by-Step Instructions for Configuring Branch and Merge Protection per Git Provider

Each Git provider manages branch and merge protection settings differently. To ensure your configurations are correct, follow the specific instructions for the Git solution connected to your system:

  • GitHub: Learn how to set up branch and merge protection rules in GitHub Cloud.

  • GitLab: Detailed steps for configuring protection rules in GitLab.

  • Bitbucket: Instructions for setting up branch and merge protection in Bitbucket.

  • Azure DevOps: Guide to applying branch protection rules in Azure DevOps.

Did this answer your question?