Skip to main content
All CollectionsIntegrating Git and CI/CD
Protecting the Environment Branches in Git
Protecting the Environment Branches in Git
Kirk DeBaets avatar
Written by Kirk DeBaets
Updated over 3 weeks 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.
The environment branch name shows up in the version control section of Salto's UI environment settings page.

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?