Repo is a code versioning tool that consists of a series of Python scripts that encapsulate a series of GIT commands for unified management of multiple Git repositories.
Because Android source code refers to a lot of open source projects, each sub-project is a git repository, each git repository has a lot of branch version, in order to facilitate the unified management of the various sub-projects of the Git repository, need a top tool batch processing, so repo was born.
Repo also builds a git repository that records which branch of the GIT repository for each sub-project under the current Android version, which is often called the manifest repository.
Repo Start <topic_name>
Starting a new theme is actually creating a new branch for each project.
Repo Init-u <url> [OPTIONS]
Initializing the repo in the current directory will generate a. Repo directory in the current directory, like. Git under Git project,-u specifies the URL, you can add parameter-m to specify the manifest file, and the default is default.xml,.repo/ Manifests save manifest file: Repo/projects has all of the project's data information, Repo is a collection of Git project, each git Directories such as refs in the. git directory under Project are linked to the. Repo/manifests.
Repo manifest
You can generate a manifest file based on the current version information for each project
Repo Sync [PROJECT1 ... PROJECTN]
Synchronize code.
Repo status
View all local project modifications, with two characters before each modified file, and the first character representing the state of the staging area.
Each two characters represents the state of the workspace
repo prune <topic>
Delete a branch that has been merge
Repo Abandon <topic>
Delete Branch, whether merged or not
Repo branch or repo branches
View all Branches
Repo diff
View Changes
Repo upload
Upload local commit to server
Repo ForAll [Project_list]-c COMMAND
Executes command commands on the specified project list or all project, plus the-p parameter to print out the path to project.
Repo forall-c ' git reset--hard head;git clean-df;git rebase--abort '
This command can undo the local modification of the entire project.
Getting Started with Git (6.repo)