Reputation: 114
I have downloaded the current master of Android AOSP which is Android 6.0 source code.
Is there a way available using repo to set the master to Android 5.1 so that all git repositories are set accordingly?
Note: I wish to do this without downloading again.
Upvotes: 0
Views: 486
Reputation: 32770
Quoting from source.android.com:
To check out a branch other than "master", specify it with -b. For a list of branches, see Source Code Tags and Builds.
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
Edit
Note: I wish to do this without downloading again.
You can try with:
repo init -b <manifest-branch>
repo sync -j8
Edit 2
I want to know if there is way to do it without downloading. The sync would download from google servers.
The documentation is really clear about the sync
command:
Downloads new changes and updates the working files in your local environment. If you run repo sync without any arguments, it will synchronize the files for all the projects.
When you run repo sync, this is what happens:
If the project has never been synchronized, then repo sync is equivalent to git clone. All branches in the remote repository are copied to the local project directory.
If the project has already been synchronized once, then repo sync is equivalent to:
git remote update git rebase origin/<BRANCH>
where is the currently checked-out branch in the local project directory. If the local branch is not tracking a branch in the remote repository, then no synchronization will occur for the project.
If the git rebase operation results in merge conflicts, you will need to use the normal Git commands (for example, git rebase --continue) to resolve the conflicts.
Since you already synchronized the project once the sync
command is equivalent to a rebase
.
Upvotes: 2