Repo is a tool built on top of Git. Repo helps manage many Git repositories, does the uploads to revision control systems, and automates parts of the development workflow. Repo is not meant to replace Git, only to make it easier to work with Git. The repo command is an executable Python script that you can put anywhere in your path.

init

Installs Repo in the current directory. This creates a .repo/ directory with Git repositories for the Repo source code and the standard manifest files. 

$ repo init -u url [options]

Options:

Example:

repo init -u https://user@code.rdkcentral.com/r/manifests

sync

Downloads new changes and updates the working files in your local environment, essentially accomplishing git fetch across all Git repositories.

If you run repo sync without arguments, it synchronizes the files for all projects.

$ repo sync [project-list]

Options:

Example:

repo sync 

Upload

For the specified projects, Repo compares the local branches to the remote branches updated during the last Repo sync. Repo prompts you to select one or more of the branches that haven't been uploaded for review. 

If you run repo upload without arguments, it searches all of the projects for changes to upload.

$ repo upload [project-list]
repo upload

Diff

Shows outstanding changes between the commit and the working tree using git diff.

$ repo diff [project-list]

forall

Executes the given shell command in each project.

$ repo forall [project-list] -c command

The following additional environment variables are made available byrepo forall:

Options:

Example: 

repo forall -c 'git push -u cmf branch-name'

start

Begins a new branch for development, starting from the revision specified in the manifest.

$ repo start branch-name [project-list]
Options:
 -h, --help  show this help message and exit
 --all       begin branch in all projects

The BRANCH_NAME argument provides a short description of the change you're trying to make to the projects. If you don't know, consider using the name default.

The project-list argument specifies which projects participate in this topic branch.

status

Compares the working tree to the staging area (index) and the most recent commit on this branch (HEAD) in each project specified. Displays a summary line for each file where there is a difference between these three states.

$ repo status [project-list]