2022-01-11 22:29:47 +07:00
|
|
|
# glab mr merge
|
|
|
|
|
|
|
|
> Merge GitLab merge requests.
|
2025-05-11 20:03:01 +03:00
|
|
|
> More information: <https://gitlab.com/gitlab-org/cli/-/blob/main/docs/source/mr/merge.md>.
|
2022-01-11 22:29:47 +07:00
|
|
|
|
|
|
|
- Merge the merge request associated with the current branch interactively:
|
|
|
|
|
|
|
|
`glab mr merge`
|
|
|
|
|
|
|
|
- Merge the specified merge request, interactively:
|
|
|
|
|
|
|
|
`glab mr merge {{mr_number}}`
|
|
|
|
|
|
|
|
- Merge the merge request, removing the branch on both the local and the remote:
|
|
|
|
|
2025-05-11 20:03:01 +03:00
|
|
|
`glab mr merge {{[-d|--remove-source-branch]}}`
|
2022-01-11 22:29:47 +07:00
|
|
|
|
|
|
|
- Squash the current merge request into one commit with the message body and merge:
|
|
|
|
|
2025-05-11 20:03:01 +03:00
|
|
|
`glab mr merge {{[-s|--squash]}} {{[-m|--message]}} "{{commit_message_body}}"`
|
2022-01-11 22:29:47 +07:00
|
|
|
|
|
|
|
- Display help:
|
|
|
|
|
|
|
|
`glab mr merge --help`
|