- 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
- 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
- Repo help [command]: displays Detailed Help information of command.
- 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