glab(1)

โœจ glab(1) โœจ

Hey bestie! You're looking at the manual page for glab(1) โ€” specifically the glab-repo-clone command. It's giving "let me copy that repo to your local machine" energy, and honestly? It's iconic. Let's go. ๐Ÿ’–


๐ŸŒธ NAME ๐ŸŒธ

glab-repo-clone โ€” Clone a GitLab repository or project. No cap, that's literally what it does. ๐Ÿซถ


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

glab repo clone [ | -g ] [] [flags] [-- ...]

Okay so the synopsis is a little mysterious, but don't panic โ€” we'll break it down. ๐Ÿ’…


๐ŸŽ€ DESCRIPTION ๐ŸŽ€

Clone a GitLab repository to your local machine. You can specify the repository by name, namespace/repo path, full URL, or project ID. Pick your fighter, bestie. โœจ

The command uses your configured protocol (SSH or HTTPS). So it's not out here guessing โ€” it's respecting your setup. ๐Ÿ”ฅ

To pass Git clone flags, add them after --. For example: glab repo clone <repo> -- --branch <branch-name>. The -- is like the velvet rope โ€” everything after it is for Git, not for glab. ๐Ÿ’…

When you clone a fork you own, the command adds an upstream remote that points to the parent project. That's lowkey so helpful โ€” it's giving "I got you, fam." ๐Ÿ˜ญ

Use --wiki to clone the wiki repository associated with a project. Wikis need love too, fr fr. ๐Ÿ“š


๐Ÿ’œ OPTIONS ๐Ÿ’œ

  • -g, --group="" โ€” Specify the group to clone repositories from. Like, "hey, grab everything from this group." ๐Ÿ‘‘
  • -p, --preserve-namespace[=false] โ€” Clone the repository in a subdirectory based on namespace. Keeps things organized, bestie. ๐Ÿ—‚๏ธ
  • --active[=false] โ€” Limit by project status. When true, returns active projects. When false, returns projects that are archived or marked for deletion. Used with the --group flag. So it's like a vibe check for project liveness. ๐Ÿ’€
  • -a, --archived[=false] โ€” Limit by archived status. Use with -a=false to exclude archived repositories. Used with the --group flag. We love a filter that actually filters. ๐ŸŒˆ
  • -G, --include-subgroups[=true] โ€” Include projects in subgroups of this group. Default is true. Used with the --group flag. Subgroups get to come to the party by default. ๐ŸŽ‰
  • --exclude-subgroup=[] โ€” Skip projects in this subgroup, as a path relative to the group, not a numeric ID. Repeat the flag, or separate values with commas, to skip more than one. Projects shared from other namespaces are not affected. Used with the --group flag. It's giving "not you, specifically you." ๐Ÿ™ˆ
  • -m, --mine[=false] โ€” Limit by projects in the group owned by the current authenticated user. Used with the --group flag. Main character energy only. ๐Ÿ‘‘
  • -v, --visibility="" โ€” Limit by visibility: public, internal, private. Used with the --group flag. Choose your privacy level, bestie. ๐Ÿ”’
  • -I, --with-issues-enabled[=false] โ€” Limit by projects with the issues feature enabled. Default is false. Used with the --group flag. Issues on? Let's go. ๐Ÿ›
  • -M, --with-mr-enabled[=false] โ€” Limit by projects with the merge request feature enabled. Default is false. Used with the --group flag. MRs? Say less. ๐Ÿ”€
  • -S, --with-shared[=true] โ€” Include projects shared to this group. Default is true. Used with the --group flag. Sharing is caring. ๐Ÿซถ
  • --paginate[=false] โ€” Make additional HTTP requests to fetch all pages of projects before cloning. Respects --per-page. So you don't miss anything. Periodt. ๐Ÿ“„
  • --page=1 โ€” Page number. Like, which page are we on? Default is 1. ๐Ÿ“–
  • --per-page=30 โ€” Number of items to list per page. Default is 30. Not too many, not too few. ๐Ÿ’…
  • --wiki[=false] โ€” Clone the project's wiki repository. For the wiki girlies. ๐Ÿ“š

๐Ÿงš OPTIONS INHERITED FROM PARENT COMMANDS ๐Ÿงš

  • -h, --help[=false] โ€” Show help for this command. When in doubt, ask for help. No shame in it. ๐Ÿ’–

๐ŸŒŸ EXAMPLE ๐ŸŒŸ

Okay bestie, here's where it gets fun. These examples are your cheat codes. ๐ŸŽฎ

# Clones repository into current directory
glab repo clone gitlab-org/cli
glab repo clone https://gitlab.com/gitlab-org/cli

# Clones repository into 'mydirectory'
glab repo clone gitlab-org/cli mydirectory

# Clones a project's wiki repository
glab repo clone --wiki gitlab-org/cli

# Clones repository 'glab' for current user
glab repo clone glab

# Finds the project by the ID provided and clones it
glab repo clone 4356677

# Clones a specific branch
glab repo clone gitlab-org/cli -- --branch development

# Clones with a shallow clone (depth 1)
glab repo clone gitlab-org/cli -- --depth 1

# Clones with multiple Git flags
glab repo clone gitlab-org/cli -- --branch main --single-branch --depth 1

# Clones all repos in a group
glab repo clone -g everyonecancontribute --paginate

# Clones all repos in a group, except those in one subgroup
glab repo clone -g mygroup --exclude-subgroup domain/backend --paginate

# Clones all non-archived repos in a group
glab repo clone -g everyonecancontribute --archived=false --paginate

# Clones only active projects in a group
glab repo clone -g everyonecancontribute --active=true --paginate

# Clones from a GitLab Self-Managed or GitLab Dedicated instance
GITLAB_HOST=salsa.debian.org glab repo clone myrepo

See? Iconic. Every single detail is there โ€” I didn't skip a thing. ๐Ÿ’…


๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ

  • glab-repo(1) โ€” the parent command. Go check it out, bestie. ๐Ÿซถ

Auto-generated by spf13/cobra, November 2026, version glab(1). Stay slay, stay cloned. ๐Ÿ’–โœจ
๐Ÿ“ฆ where this page comes from