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

Configuring the Repository Settings

Constraints

Table 1 Constraints on configuring repository permissions

Item

Description

Permission constraint

You must have the set permission on the repository. If you do not have the permission, configure the permission by referring to Configuring Repo-Level Permissions.

Function constraint

If Force inherit is selected in the project-level Repo Settings, Repo Settings is not supported at the repository level.

Repository Settings

  1. If the project-level configuration is not inherited, set parameters by referring to this section. Go to the target repository homepage. Choose Settings > Repository Management > Repository Settings, as shown in the following figure.

    Figure 1 Repository settings page

  2. Set Default Branch to the target branch. For example, if you set the default branch to Test_0108, the selected branch will be displayed as the default target branch on the Code page or when you create a merge request.
  3. If Whitelist for creating branches is selected, only repository members with the developer role can create branches in this whitelist. Non-developers will not be displayed and will not take effect even after configuration.
  4. If you select Inherit from project, the project settings are automatically inherited. If you do not select this option, set parameters by referring to the table.

    Table 2 Repository settings description

    Parameter

    Description

    Do not fork a repository

    After this option is selected, the repository cannot be forked.

    Pre-merge

    After this option is selected, the server automatically generates MR pre-merging code. Compared with running commands on the client, this operation is more efficient and simple, and the build result is more accurate. This option applies to scenarios that have strict requirements on real-time build. For details, see Example.

    Branch Name Rule

    All branch names must match the regular expression with max. 500 characters. For details, see Table 3. If this field is left blank, any branch name is allowed. The rules must meet the following branch naming rules:

    • Max. 500 characters.
    • Do not start with refs/heads and refs/remotes/ nor end with period (.), slash (/), and .lock. Spaces and the following characters are not supported:. [ \ < ~ ^: ? ( ) ' " |.
    • The name of a new branch cannot be the same as that of an existing branch or tag.

    Tag Name Rule

    All tag names must match the regular expression specified by this parameter. For details, see Table 3. If this parameter is left empty, any tag name is allowed. The tag name must comply with the basic tag naming rules and contain a maximum of 500 characters. The rules must meet the following tag naming rules:

    • Max. 500 characters.
    • Do not start with refs/heads/, refs/remotes/ nor end with . / .lock. Spaces and the following characters are not supported:. [ \ < ~ ^: ? ( ) ' " |.
    • The name of a new tag cannot be the same as that of an existing branch or tag.