REPO(1)

πŸ’– REPO(1) πŸ’–

okay bestie, so this is the manual for repo init β€” yes, the repo command, the init subcommand, the whole ~vibe~. it lives in the Repo Manual section (section 1, the big leagues) and it's gonna change your entire dev life. grab a boba, we're doing this πŸ§‹βœ¨


🌸 SYNOPSIS 🌸

repo init [options] [manifest url]

that's it. that's the whole thing. options optional (mostly), manifest url optional (until it isn't). slay. πŸ’…


✨ DESCRIPTION ✨

πŸŽ€ Summary

Initialize a repo client checkout in the current directory.

like... literally that. you run it, it sets up your repo client checkout, right here, in the directory you're standing in. no cap. πŸ‘‘


πŸ’– OPTIONS πŸ’–

  • -h, --help β€” show this help message and exit. the classic. the icon. hits different every time.

🌈 Logging options:

  • -v, --verbose β€” show all output. every last crumb of it. give me EVERYTHING.
  • -q, --quiet β€” only show errors. minimalism era. silent but deadly.

πŸ¦‹ Manifest options:

  • -u URL, --manifest-url=URL β€” manifest repository location. where the manifest lives, bestie.
  • -b REVISION, --manifest-branch=REVISION β€” manifest branch or revision (use HEAD for default).
  • --manifest-upstream-branch=BRANCH β€” when a commit is provided to --manifest-branch, this is the name of the git ref in which the commit can be found.
  • -m NAME.xml, --manifest-name=NAME.xml β€” initial manifest file.
  • -g GROUP, --groups=GROUP β€” restrict manifest projects to ones with specified group(s) [default|all|G1,G2,G3|G4,-G5,-G6]. yes you can do minus signs, we love a subtraction arc βž–
  • -p PLATFORM, --platform=PLATFORM β€” restrict manifest projects to ones with a specified platform group [auto|all|none|linux|darwin|...].
  • --submodules β€” sync any submodules associated with the manifest repo. little repos inside your repo, it's giving nesting dolls πŸͺ†
  • --standalone-manifest β€” download the manifest as a static file rather then create a git checkout of the manifest repo. (yes, "rather then". that's the original spelling, i don't make the rules, i just respect the lore πŸ™ˆ)
  • --manifest-depth=DEPTH β€” create a shallow clone of the manifest repo with given depth (0 for full clone); see git clone (default: 0).

🌸 Manifest (only) checkout options:

  • -c, --current-branch β€” fetch only current manifest branch from server (default).
  • --no-current-branch β€” fetch all manifest branches from server. chaos mode, respect.
  • --tags β€” fetch tags in the manifest.
  • --no-tags β€” don't fetch tags in the manifest.

πŸ‘‘ Checkout modes:

  • --mirror β€” create a replica of the remote repositories rather than a client working directory.
  • --archive β€” checkout an archive instead of a git repository for each project. See git archive.
  • --worktree β€” use git-worktree to manage projects.
  • --use-local-gitdirs β€” bypass .repo/projects/ and use standard Git layout in working tree.

πŸ’… Project checkout optimizations:

  • --reference=DIR β€” location of mirror directory.
  • --dissociate β€” dissociate from reference mirrors after clone.
  • --depth=DEPTH β€” create a shallow clone with given depth; see git clone.
  • --partial-clone β€” perform partial clone (https://git-scm.com/docs/partial-clone).
  • --no-partial-clone β€” disable use of partial clone (https://git-scm.com/docs/partial-clone).
  • --partial-clone-exclude=PARTIAL_CLONE_EXCLUDE β€” exclude the specified projects (a comma-delimited project names) from partial clone (https://git-scm.com/docs/partial-clone).
  • --clone-filter=CLONE_FILTER β€” filter for use with --partial-clone [default: blob:none].
  • --use-superproject β€” use the manifest superproject to sync projects; implies -c.
  • --no-use-superproject β€” disable use of manifest superprojects.
  • --clone-bundle β€” enable use of /clone.bundle on HTTP/HTTPS (default if not --partial-clone).
  • --no-clone-bundle β€” disable use of /clone.bundle on HTTP/HTTPS (default if --partial-clone).
  • --git-lfs β€” enable Git LFS support.
  • --no-git-lfs β€” disable Git LFS support.

🫢 repo Version options:

  • --repo-url=URL β€” repo repository location ($REPO_URL).
  • --repo-rev=REV β€” repo branch or revision ($REPO_REV).
  • --no-repo-verify β€” do not verify repo source code.

πŸ“ Other options:

  • --config-name β€” Always prompt for name/e-mail.

🧚 Multi-manifest:

  • --outer-manifest β€” operate starting at the outermost manifest.
  • --no-outer-manifest β€” do not operate on outer manifests.
  • --this-manifest-only β€” only operate on this (sub)manifest.
  • --no-this-manifest-only, --all-manifests β€” operate on this manifest and its submanifests.

Run repo help init to view the detailed manual. (yes, there's a more detailed one. the lore goes deeper πŸ“š)


⭐ DETAILS ⭐

The repo init command is run once to install and initialize repo. The latest repo source code and manifest collection is downloaded from the server and is installed in the .repo/ directory in the current working directory. one and done, bestie, that's the whole ritual πŸŒ™

When creating a new checkout, the manifest URL is the only required setting. It may be specified using the --manifest-url option, or as the first optional argument. so like, you gotta tell it where the manifest is. there's no getting around it. that's the one non-negotiable, fr fr.

The optional -b argument can be used to select the manifest branch to checkout and use. If no branch is specified, the remote's default branch is used. This is equivalent to using -b HEAD. letting the remote pick for you is valid, it's giving trust the process 🫢

The optional --manifest-upstream-branch argument can be used when a commit is provided to --manifest-branch (or -b), to specify the name of the git ref in which the commit can be found. so you hand it a commit, and this tells it where that commit lives. mystery solved πŸ”

The optional -m argument can be used to specify an alternate manifest to be used. If no manifest is specified, the manifest default.xml will be used. default.xml is the main character until you say otherwise πŸ‘‘

If the --standalone-manifest argument is set, the manifest will be downloaded directly from the specified --manifest-url as a static file (rather than setting up a manifest git checkout). With --standalone-manifest, the manifest will be fully static and will not be re-downloaded during subsesquent repo init and repo sync calls. frozen. locked in. not touching it again. ❄️ (and yes β€” "subsesquent". that's what the page says. we do not edit the ancestors' typos, we honor them πŸ’€)

The --reference option can be used to point to a directory that has the content of a --mirror sync. This will make the working directory use as much data as possible from the local reference directory when fetching from the server. This will make the sync go a lot faster by reducing data traffic on the network. local data go brrr, network stay chill πŸ”₯

The --dissociate option can be used to borrow the objects from the directory specified with the --reference option only to reduce network transfer, and stop borrowing from them after a first clone is made by making necessary local copies of borrowed objects. borrowed then owned. glow up complete ✨

The --no-clone-bundle option disables any attempt to use $URL/clone.bundle to bootstrap a new Git repository from a resumeable bundle file on a content delivery network. This may be necessary if there are problems with the local Python HTTP client or proxy configuration, but the Git binary works. (again β€” "resumeable". legacy spelling. we respect it. πŸ™‡)

🌟 Switching Manifest Branches

To switch to another manifest branch, repo init -b otherbranch may be used in an existing client. However, as this only updates the manifest, a subsequent repo sync (or repo sync -d) is necessary to update the working directory files.

⚠️ okay this part MATTERS, bestie: repo init -b otherbranch alone does not change your working directory files. it only updates the manifest. you still gotta run repo sync (or repo sync -d) afterwards. do not skip this step. i am begging you. πŸ™

that's the whole page, you made it, i'm so proud of you πŸ₯ΉπŸ’œ this was repo init from the Repo Manual, dated June 2026, and the footer just says repo init / June 2026 / REPO(1) β€” but between us, it's giving iconic. now go initialize something. periodt. πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from