2020-08-12 00:34:55 +01:00
|
|
|
# glab
|
|
|
|
|
2023-07-16 19:23:40 +02:00
|
|
|
> Work seamlessly with GitLab.
|
2024-10-04 21:14:41 +02:00
|
|
|
> Some subcommands such as `config` have their own usage documentation.
|
2025-05-11 20:03:01 +03:00
|
|
|
> More information: <https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source>.
|
2020-08-12 00:34:55 +01:00
|
|
|
|
2022-05-02 17:55:38 +07:00
|
|
|
- Clone a GitLab repository locally:
|
2020-08-12 00:34:55 +01:00
|
|
|
|
2022-05-02 17:55:38 +07:00
|
|
|
`glab repo clone {{owner}}/{{repository}}`
|
2020-08-12 00:34:55 +01:00
|
|
|
|
|
|
|
- Create a new issue:
|
|
|
|
|
|
|
|
`glab issue create`
|
|
|
|
|
2022-05-02 17:55:38 +07:00
|
|
|
- View and filter the open issues of the current repository:
|
2020-08-12 00:34:55 +01:00
|
|
|
|
|
|
|
`glab issue list`
|
|
|
|
|
2022-05-02 17:55:38 +07:00
|
|
|
- View an issue in the default browser:
|
|
|
|
|
2025-05-11 20:03:01 +03:00
|
|
|
`glab issue view {{[-w|--web]}} {{issue_number}}`
|
2022-05-02 17:55:38 +07:00
|
|
|
|
|
|
|
- Create a merge request:
|
|
|
|
|
|
|
|
`glab mr create`
|
|
|
|
|
|
|
|
- View a pull request in the default web browser:
|
2020-08-12 00:34:55 +01:00
|
|
|
|
2025-05-11 20:03:01 +03:00
|
|
|
`glab mr view {{[-w|--web]}} {{pr_number}}`
|
2020-08-12 00:34:55 +01:00
|
|
|
|
2022-05-02 17:55:38 +07:00
|
|
|
- Check out a specific pull request locally:
|
2020-08-12 00:34:55 +01:00
|
|
|
|
2022-05-02 17:55:38 +07:00
|
|
|
`glab mr checkout {{pr_number}}`
|