Forrest logo
back to the glab tool

glab-repo:tldr:fa27d

glab-repo: Fork and clone a repository.
$ glab repo fork ${owner}/${repository} --clone
try on your machine

This command is used in the command-line interface of GitLab (glab) to create a fork of a repository owned by another user or organization.

The command takes the following parameters:

  • ${owner}: The username or organization name of the owner of the original repository.
  • ${repository}: The name of the original repository.

--clone is a flag that specifies that the forked repository should also be cloned to the local machine. When this flag is used, the forked repository is not only created on the GitLab server but also copied to your local machine, allowing you to work with it locally.

By running this command, you are requesting to fork a repository from the specified ${owner} and ${repository} to your own GitLab account or organization, and you also want to have a local copy of the forked repository.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the glab tool