← 返回命令列表

Linux command

glab-mr-create 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Create MR interactively

glab mr create

Create with title

glab mr create -t "[title]"

Create as draft

glab mr create --draft -t "[title]"

Create with reviewers

glab mr create -t "[title]" --reviewer [user1],[user2]

Create to specific branch

glab mr create --target-branch [main]

Fill from commits

glab mr create --fill

说明

glab mr create creates a new GitLab merge request from the current branch. It supports drafts, reviewer assignment, labels, and auto-filling title and description from commit messages. When run without flags, it launches an interactive editor for composing the merge request.

参数

-t, --title _title_
MR title.
-d, --description _text_
MR description.
--draft
Create as draft.
-a, --assignee _users_
Assign users.
--reviewer _users_
Request reviewers.
--target-branch _branch_
Target branch.
--source-branch _branch_
Source branch.
--fill
Fill from commits.
-l, --label _labels_
Add labels.
--web
Open in browser.

FAQ

What is the glab-mr-create command used for?

glab mr create creates a new GitLab merge request from the current branch. It supports drafts, reviewer assignment, labels, and auto-filling title and description from commit messages. When run without flags, it launches an interactive editor for composing the merge request.

How do I run a basic glab-mr-create example?

Run `glab mr create` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -t, --title _title_ do in glab-mr-create?

MR title.