Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Switch from AOSP master to froyo

I just checked out master with repo. Now I want to switch to froyo. How can I do this without downloading a bunch of stuff again? I don't want to download a bunch of stuff again, I just want to be able to move freely between branches as in a normal git clone.

like image 677
jeffcook2150 Avatar asked Jun 04 '11 10:06

jeffcook2150


3 Answers

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

repo init -b froyo; repo sync

This will download only the files you need to switch branches, just like moving between branches with git.

like image 162
Mark Loiseau Avatar answered Oct 16 '22 21:10

Mark Loiseau


keyboardsurfer provides the commands to checkout the the froyo branch of every project you currently have.

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

Thus you should run this first and then run keyboardsurfer's commands:

cd .repo/manifests
git checkout -b froyo korg/froyo
cd ../..
repo sync
like image 41
aultimus Avatar answered Oct 16 '22 23:10

aultimus


cd into your repo directory, then execute repo forall -c git checkout korg/froyo for checking out the froyo branch for all subrepos and repo forall external/qemu sdk -c git checkout korg/tools_r6for checking out the correct android tools for froyo.

In this way repo works in a similar way as git submodule foreach. You can also go back to the head revisions via git forall -c git checkout HEAD or a simple repo sync

like image 2
keyboardsurfer Avatar answered Oct 16 '22 21:10

keyboardsurfer