Scroll to navigation

REPO(1) Repo Manual REPO(1)

NAME

repo - repo init - manual page for repo init

SYNOPSIS

repo init [options] [manifest url]

DESCRIPTION

Summary

Initialize a repo client checkout in the current directory

OPTIONS

show this help message and exit

Logging options:

show all output
only show errors

Manifest options:

manifest repository location
manifest branch or revision (use HEAD for default)
when a commit is provided to --manifest-branch, this is the name of the git ref in which the commit can be found
initial manifest file
restrict manifest projects to ones with specified group(s) [default|all|G1,G2,G3|G4,-G5,-G6]
restrict manifest projects to ones with a specified platform group [auto|all|none|linux|darwin|...]
sync any submodules associated with the manifest repo
download the manifest as a static file rather then create a git checkout of the manifest repo
create a shallow clone of the manifest repo with given depth (0 for full clone); see git clone (default: 0)

Manifest (only) checkout options:

fetch only current manifest branch from server (default)
fetch all manifest branches from server
fetch tags in the manifest
don't fetch tags in the manifest

Checkout modes:

create a replica of the remote repositories rather than a client working directory
checkout an archive instead of a git repository for each project. See git archive.
use git-worktree to manage projects

Project checkout optimizations:

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

repo Version options:

repo repository location ($REPO_URL)
repo branch or revision ($REPO_REV)
do not verify repo source code

Other options:

Always prompt for name/e-mail

Multi-manifest:

operate starting at the outermost manifest
do not operate on outer manifests
only operate on this (sub)manifest
operate on this manifest and its submanifests

Run `repo help init` to view the detailed manual.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

September 2024 repo init