Repo introduction:
Repo is much easier to use than git. Simply put, repo is like a package, which gives git a layer of skin.
Repo is also a script tool developed by Google. To manage multiple git libraries and submit code to Gerrit. gepo, it wraps git usage and simplifies many git operations.
Generally, the GIT and repo commands are used at the same time.
Repo manages multiple git libraries through the manifest file. The manifest file is an XML file in. in the repo/manifests/directory, that is, default. XML file, which records the list of all git databases. Each git database corresponds to a branch, revision, or tag.
Use of Repo:
$ Repo init
The repo script code in the remote code library is retrieved, and the manifest file is retrieved locally.
$ Repo sync
The code of the remote code library is synchronized to the local device according to the file in manifest.
$ Repo start <branch> [-- all | <project>...]
Use revision as the status point to create a local branch. The difference between it and git branch is that the latter cannot submit code through repo upload.
$ Repo upload [<project>...] | [-- replace <project>]
Submit all your modifications to Gerrit. Note: every time a commit is used as a new change, a new change-ID will be generated.
When you have amend your commit, you can use the -- replace parameter to submit the code.
Tips for repo:
We recommend that you re-create a development branch after an upload operation to avoid unnecessary troubles caused by submission conflicts.