Merge Message Templates


目录

File Names

Possible file names for PR (Pull Request) default merge message templates:

Note: .gitea as the root directory is also recognized and kept only for compatibility reasons.

If Forgejo cannot find the file in the repository, it will search the CustomPath for a folder named default_merge_message which may contain site-wide templates.

Title/Body separation

The first line of the template creates the title, the rest makes the body of the message. Without a template, the default texts are:

You can customize the title and body of the default message following these rules:

Examples

Replace the default title and keep the default body:

Merge Title

Replace the default title and make the default body empty:

Merge Title\n

Keep the default title and replace the default body:

\n
Merge Body

The space in the first line makes the default title empty and replace the default body:

 \n
Merge body

Variables

You can use the following variables enclosed in ${} inside these templates, which follow os.Expand syntax:

Rebase

When rebasing without a merge commit, REBASE_TEMPLATE.md modifies the message of the last commit. The following additional variables are available in this template:


版本号 #1
由 cocobook-sync 创建于 2026-10-28 16:37:38 UTC
由 cocobook-sync 更新于 2026-10-28 16:37:38 UTC