1

I downloaded the android code from source.android.com. Then I created a new branch from this code:

repo start mybranch platform/external/webkit

Then I tried to switch to the new branch using :

git checkout mybranch

which failed with this error message:

fatal: Not a git repository (or any parent up to mount parent /media) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

I tried the steps mentioned in the android link.

One more problem: when I use the command

repo branch 

it shows only the branch which I created eailer. How can I switch between the code I have downloaded and the code I have made changes to?

1 Answer 1

1

The android source consists of several hundred git repositories. The repo tool helps maintain all these repositories.

Therefore when you are directly in the root of your android clone, you are not actually in a git repository. You have to enter a sub-directory containing a git repository before you can start using git commands.

For example the build/ directory is a git repository itself, you can try:

$ cd build/
$ git checkout mybranch

Which sub-directory you need to enter of cause depends on where you want to modify the android source. :)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.