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--groupflag. So it's like a vibe check for project liveness. ๐-a,--archived[=false]โ Limit by archived status. Use with-a=falseto exclude archived repositories. Used with the--groupflag. We love a filter that actually filters. ๐-G,--include-subgroups[=true]โ Include projects in subgroups of this group. Default is true. Used with the--groupflag. 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--groupflag. 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--groupflag. Main character energy only. ๐-v,--visibility=""โ Limit by visibility:public,internal,private. Used with the--groupflag. Choose your privacy level, bestie. ๐-I,--with-issues-enabled[=false]โ Limit by projects with the issues feature enabled. Default is false. Used with the--groupflag. 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--groupflag. MRs? Say less. ๐-S,--with-shared[=true]โ Include projects shared to this group. Default is true. Used with the--groupflag. 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 byspf13/cobra, November 2026, versionglab(1). Stay slay, stay cloned. ๐โจ
๐ฆ where this page comes from
- arch rolling: glab 1.128.0-1 ยท MIT
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms