Cli/ref/mw gitlab repo clone
Appearance
mw gitlab repo clone
[edit]Clone a GitLab repository/project
Synopsis
[edit]Clone supports these shorthands
- repo
- namespace/repo
- org/group/repo
- project ID
mw gitlab repo clone <repo> [flags] [<dir>] [-- [<gitflags>...]]
Examples
[edit]$ glab repo clone profclems/glab $ glab repo clone https://gitlab.com/profclems/glab $ glab repo clone profclems/glab mydirectory # Clones repo into mydirectory $ glab repo clone glab # clones repo glab for current user $ glab repo clone 4356677 # finds the project by the ID provided and clones it # Clone all repos in a group $ glab repo clone -g everyonecancontribute --paginate # Clone all non-archived repos in a group $ glab repo clone -g everyonecancontribute --archived=false --paginate # Clone from a self-hosted instance $ GITLAB_HOST=salsa.debian.org glab repo clone myrepo
Options
[edit]-a, --archived Limit by archived status. Use with -a=false to exclude archived repositories. Used with --group flag -g, --group string Specify group to clone repositories from -G, --include-subgroups Include projects in subgroups of this group. Default is true. Used with --group flag (default true) -m, --mine Limit by projects in the group owned by the current authenticated user. Used with --group flag --page int Page number (default 1) --paginate Make additional HTTP requests to fetch all pages of projects before cloning. Respects --per-page --per-page int Number of items to list per page (default 30) -p, --preserve-namespace Clone the repo in a subdirectory based on namespace --visibility string Limit by visibility {public, internal, or private}. Used with --group flag -I, --with-issues-enabled Limit by projects with issues feature enabled. Default is false. Used with --group flag -M, --with-mr-enabled Limit by projects with merge requests feature enabled. Default is false. Used with --group flag -S, --with-shared Include projects shared to this group. Default is false. Used with --group flag
Options inherited from parent commands
[edit]--help Help for this command --no-interaction Do not ask any interactive questions -v, --verbose count Increase output verbosity. Example: --verbose=2 or -vv
SEE ALSO
[edit]- mw gitlab repo - Work with GitLab repositories and projects