glab-mr-create
Create a new GitLab merge request
TLDR
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
Skip prompts and push the branch$ glab mr create --fill --push --yes
Create for a linked issue$ glab mr create --related-issue [issue-number]
SYNOPSIS
glab mr create [options]
DESCRIPTION
glab mr create creates a new GitLab merge request from the current branch. It supports drafts, reviewer assignment, labels, milestones, and auto-filling title and description from commit messages.When run without flags, it launches an interactive prompt for composing the merge request.
PARAMETERS
-t, --title title
MR title.-d, --description text
MR description. Use `-` to open an editor.--draft, --wip
Mark the merge request as a draft.-a, --assignee users
Assign the MR to users by username; comma-separate or repeat the flag.--reviewer users
Request review from users by username; comma-separate or repeat the flag.-b, --target-branch branch
Target/base branch to merge into.-s, --source-branch branch
Branch to create the MR from (default: current branch).-f, --fill
Don't prompt for title/description, use commit info instead. Implies --push.--fill-commit-body
When multiple commits exist, fill the description with every commit body. Requires --fill.-l, --label labels
Add labels by name; comma-separate or repeat the flag.-m, --milestone milestone
Assign a milestone by ID or title.-i, --related-issue issue
Create the MR for an issue; uses the issue title if --title is omitted.--push
Push local commits to the source branch after creating the MR.--remove-source-branch
Remove the source branch when the MR is merged.--squash-before-merge
Squash commits into one when merging.-H, --head repo
Use another head repository, as `OWNER/REPO`, `GROUP/NAMESPACE/REPO`, a project ID, or a full URL.--template name
Use a template from `.gitlab/mergerequesttemplates/` to pre-fill the description.-y, --yes
Skip the submission confirmation prompt. Use with --fill to skip all optional prompts.-w, --web
Continue MR creation in the browser.
INSTALL
sudo apt install glab
sudo dnf install glab
sudo pacman -S glab
sudo apk add glab
sudo zypper install glab
brew install glab
nix profile install nixpkgs#glab
