Common repo commands

Source: Internet
Author: User
  1. Download repo address: http://android.git.kernel.org/repo, you can use wget http://android.git.kernel.org/repo or curl http://android.git.kernel.org/repo> ~ /Bin/repo to download Repo, chmod A + x ~ /Bin/Repo
  2. When you use repo sync to capture the android source code, some errors often occur, causing the repo sync to be interrupted. You must start manually each time. You can use the following command to automatically repeat: $? = 1; while [$? -Ne 0]; do repo sync; done
  3. Repo help [command]: displays Detailed Help information of command.
  4. Repo init-u URL. After repository is installed in the current directory, a directory ". Repo"-u will be created in the current directory to specify a URL and obtain the repository manifest file from this URL. Repo init-u git: // android.git.kernel.org/platform/manifest.git

You can use the-M parameter to select a specific manifest file in repository. If not specified, it is represented as the default namifest file (default. repo init-u git: // android.git.kernel.org/platform/manifest.git-M dalvik-plus.xml

You can use the-B parameter to specify a manifest branch.

Repo init-u git: // android.git.kernel.org/platform/manifest.git-B release-1.0

You can use the command: repo help init to obtain other repo init usage.

4. Repo sync [project-list]

Download the latest local working file. The update is successful. The local file is the same as the code in repository. You can specify the project to be updated. If no parameter is specified, all projects are synchronized.

If you run repo sync for the first time, this command is equivalent to git clone, and all the content in repository will be copied to the local device. If you do not run repo sync for the first time, it is equivalent to git remote update; git rebase origin/branch. Repo sync updates the files under. repo. If a conflict occurs during the merge process, you need to manually run git rebase -- continue

5. Repo update [project-list]

Upload the modified Code. If your local code has been modified, you will be prompted to upload the modified Code when running repo sync, all the modified Code branches will be uploaded to Gerrit (web-based code review system). The uploaded code of Gerrit will be converted to one by one, so that people can review the modified Code.

6. Repo diff [project-list]

Displays the differences between the submitted code and the current working directory code.

7. Repo download target Revision

Download a specific version to a local device, for example, Repo download pltform/frameworks/base 1241 download the Code with the modified version 1241

8. Repo start newbranchname

Create a new branch. "." Indicates the branch of the current job.

9. Repo prune [project list]

Delete a merge Project

10. Repo foreach [project-lists]-C command

Run the command for each project

11. Repo status

Displays the project status


Address: http://blog.csdn.net/clozxy/article/details/5599585

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.