Updated on 2025-07-25 GMT+08:00

Configuring Protected Branch Rules for a Repository Group

You can configure protected branch rules for all repositories in a repository group. Before the configuration, view Constraints and configure protected branches for the repository groups by referring to Configuring Protected Branches for a Repository Group.

Constraints

Table 1 Constraints on configuring protected branch rules

Item

Description

Permission constraint

To configure protected branch rules for repository under a repository group, you need to have the set permission for repository groups. For details, see Configuring a Repository Group's Permissions.

Function constraint

  • Only one protected branch rule can be created for a branch. Otherwise, the error message indicating that the operation failed and the protected branch xxx already exists is displayed.
  • If you select Inherit from project, the settings of the project are automatically inherited and cannot be modified.
  • If Force inherit is selected, all child repository groups and repositories in the repository group will use the following settings and cannot be changed.

Configuring Protected Branches for a Repository Group

  1. Go to the details page of the repository group Test_Group to be configured, choose Settings > Policy Settings > Protected Branches, and click Create Protected Branch.

  2. If you do not select this option, see 2.