Switch from AOSP master to froyo

I just checked the master with the repo. Now I want to switch to froyo. How can I do this without loading a bunch of things again? I don’t want to load a bunch of things again, I just want to be able to move freely between branches, as in the usual git clone.

+6
source share
4 answers

Since you downloaded everything with a repo, you can easily use a repo to switch between branches without having to download everything again:

repo init -b froyo; repo sync

This will download only the files needed to switch branches, just like moving between branches using git.

+11
source

keyboardsurfer provides commands to check the froyo branch of each project that you currently have.

However, projects that have been added or removed between versions will not be added or removed to / from your working tree correctly.

Therefore, you must run this first and then execute the keyboardsurfer commands:

 cd .repo/manifests git checkout -b froyo korg/froyo cd ../.. repo sync 
+3
source

cd to the repo directory, then do repo forall -c git checkout korg/froyo to check the froyo branch for all subrepos and repo forall external/qemu sdk -c git checkout korg/tools_r6 to check the correct Android tools for froyo.

Thus, the repo works similarly to git submodule foreach . You can also revert to head changes via git forall -c git checkout HEAD or just repo sync

+2
source

if the branch you are in and the branch you switch to have the same manifest.xml file, then you can use the following commands for this.

 repo forall -c git fetch aosp --tags repo forall -c git checkout -b john5.1.1_r14_api22 android-5.1.1_r14 

also see details at http://johnliao52.imtqy.com/2016/03/27/git-repo-skills.html

0
source

Source: https://habr.com/ru/post/889764/


All Articles