Branch Settings
Selecting the Default and Working Project Branches
On the branch settings page, you can specify the default branch, which will be displayed on the project overview page. The working branch is the branch that GitFlic will reference when creating a merge request.
Branch Protection
To define a set of rules for managing access to repository branches, you should create a Branch Protection Rule by filling in the fields:
- Branch - a wildcard pattern for branch names to which the rule will apply.
Pattern Examples
* - any number of characters. For example, feature-* will match feature-gtlf-1, feature-gtlf2. Will not match feature-gtlf1/release.
? - a single character. For example, feature-gtfl-? will match feature-gtlf-1, feature-gtlf-2. Will not match feature-gtlf-2-1, feature-gtlf-22.
** - any number of characters including slashes. For example, feature/** will match feature/gtlc-1, feature/gtlc-12, feature/gtlc/1.
- PUSH Permission - the minimum role required for a user to make changes to the branch, both via the web interface and via CLI.
- MERGE Permission - the minimum role required for a user to perform merge requests into the target branch covered by the rule.
- Allow
push --force- allows specifying whether thegit push --forcecommand is permitted for the branch covered by the rule. This option has higher priority than the project setting. - Require merge approval from code owners - when enabled, all merge requests into target branches covered by the rule will require approvals from code owners to perform the merge.
- Enable auto-merge by default - when enabled, auto-merge will be automatically turned on in all merge requests into target branches covered by the rule.
Auto-merge Details
In the project settings, under Merge Requests, the Allow automatic merging option must be enabled. Auto-merge will not be automatically enabled if the merge request is immediately ready for merging. This behavior is necessary to prevent instant merging of requests without review.
- Priority - a number that determines which rule will be applied to a branch. The default value is
0. This is only necessary when different rules overlap and conflict for specific branches.
To complete the rule creation, click the Enable Protection button. The list of created rules allows for modifying or deleting rules.
Automated translation!
This page was translated using automatic translation tools. The text may contain inaccuracies.

