LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

glab-mr-merge

Merge a GitLab merge request

TLDR

Merge a merge request
$ glab mr merge [number]
copy
Merge with squash
$ glab mr merge [number] --squash
copy
Merge without deleting branch
$ glab mr merge [number] --remove-source-branch=false
copy
Merge when pipeline succeeds
$ glab mr merge [number] --when-pipeline-succeeds
copy
Merge with a custom commit message
$ glab mr merge [number] --message "[commit message]"
copy
Merge with rebase
$ glab mr merge [number] --rebase
copy

SYNOPSIS

glab mr merge [number] [options]

DESCRIPTION

glab mr merge merges a GitLab merge request. It supports squash merging, rebasing, automatic source branch deletion, and deferred merging that waits for the CI pipeline to pass before completing.

PARAMETERS

--squash

Squash commits on merge.
--rebase
Rebase the commits onto the base branch before merging.
--remove-source-branch
Delete source branch after merge.
--when-pipeline-succeeds
Set the merge request to merge when the pipeline succeeds.
--message text
Custom merge commit message.
--sha sha
Merge when the HEAD of the source branch matches the given SHA. Prevents merging unexpected changes.
-y, --yes
Skip confirmation prompt.

SEE ALSO

Copied to clipboard
Kai