2022-01-11 22:29:47 +07:00
|
|
|
# glab mr
|
|
|
|
|
2023-07-16 19:23:40 +02:00
|
|
|
> Manage GitLab merge requests.
|
2024-10-04 21:14:41 +02:00
|
|
|
> Some subcommands such as `create` have their own usage documentation.
|
2025-05-11 20:03:01 +03:00
|
|
|
> More information: <https://gitlab.com/gitlab-org/cli/-/blob/main/docs/source/mr/index.md>.
|
2022-01-11 22:29:47 +07:00
|
|
|
|
|
|
|
- Create a merge request:
|
|
|
|
|
|
|
|
`glab mr create`
|
|
|
|
|
2022-05-02 17:55:38 +07:00
|
|
|
- Check out a specific merge request locally:
|
2022-01-11 22:29:47 +07:00
|
|
|
|
|
|
|
`glab mr checkout {{mr_number}}`
|
|
|
|
|
|
|
|
- View the changes made in the merge request:
|
|
|
|
|
|
|
|
`glab mr diff`
|
|
|
|
|
|
|
|
- Approve the merge request for the current branch:
|
|
|
|
|
|
|
|
`glab mr approve`
|
|
|
|
|
|
|
|
- Merge the merge request associated with the current branch interactively:
|
|
|
|
|
|
|
|
`glab mr merge`
|
|
|
|
|
|
|
|
- Edit a merge request interactively:
|
|
|
|
|
|
|
|
`glab mr update`
|
|
|
|
|
|
|
|
- Edit the target branch of a merge request:
|
|
|
|
|
|
|
|
`glab mr update --target-branch {{branch_name}}`
|