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

glab repo — Work with GitLab repositories. More information: <https://gitlab.com/gitlab-org/cli/-/blob/main/docs

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

Problem

How to use the glab repo command: Work with GitLab repositories. More information: <https://gitlab.com/gitlab-org/cli/-/blob/main/docs/source/repo/_index.md>.

Solution

glab repo — Work with GitLab repositories. More information: <https://gitlab.com/gitlab-org/cli/-/blob/main/docs/source/repo/_index.md>.

Create a new repository (if the repository name is not set, the default name will be the name of the current directory):
glab repo create {{name}}


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


Fork and clone a repository:
glab repo fork {{owner}}/{{repository}} {{[-c|--clone]}}


View a repository in the default web browser:
glab repo view {{owner}}/{{repository}} {{[-w|--web]}}


Search some repositories in the GitLab instance:
glab repo search {{[-s|--search]}} {{search_string}}

Code Snippets

Create a new repository (if the repository name is not set, the default name will be the name of the current directory)

glab repo create {{name}}

Clone a repository

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

Fork and clone a repository

glab repo fork {{owner}}/{{repository}} {{[-c|--clone]}}

View a repository in the default web browser

glab repo view {{owner}}/{{repository}} {{[-w|--web]}}

Search some repositories in the GitLab instance

glab repo search {{[-s|--search]}} {{search_string}}

Context

tldr-pages: common/glab repo

Revisions (0)

No revisions yet.