HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

glab — Work seamlessly with GitLab. Some subcommands such as `config` have their own usage documentation. M

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandglabcliseamlesslywithgitlabsomework

Problem

How to use the glab command: Work seamlessly with GitLab. Some subcommands such as config have their own usage documentation. More information: <https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source>.

Solution

glab — Work seamlessly with GitLab. Some subcommands such as config have their own usage documentation. More information: <https://gitlab.com/gitlab-org/cli/-/tree/main/docs/source>.

Clone a GitLab repository locally:
glab repo clone {{owner}}/{{repository}}


Create a new issue:
glab issue create


View and filter the open issues of the current repository:
glab issue list


View an issue in the default browser:
glab issue view {{[-w|--web]}} {{issue_number}}


Create a merge request:
glab mr create


View a pull request in the default web browser:
glab mr view {{[-w|--web]}} {{pr_number}}


Check out a specific pull request locally:
glab mr checkout {{pr_number}}

Code Snippets

Clone a GitLab repository locally

glab repo clone {{owner}}/{{repository}}

Create a new issue

glab issue create

View and filter the open issues of the current repository

glab issue list

View an issue in the default browser

glab issue view {{[-w|--web]}} {{issue_number}}

Create a merge request

glab mr create

Context

tldr-pages: common/glab

Revisions (0)

No revisions yet.