Android: git/Gerrit/repo usage

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.