tags:

views:

161

answers:

1

I am trying to get the source code for the android os. How do I repo sync a particular folder from the master branch?

A: 

Partial checkouts are not supported with Git.

You could try using git-subtree for, after cloning the all repo, splitting part of that repo into your own project repo.

That said, if you are talking about one of the "projects" in the Android, they are Git repos, and can be managed with the tool "repo"

Installing Repo

$ curl http://android.git.kernel.org/repo >~/bin/repo
$ chmod a+x ~/bin/repo
$ mkdir working-directory-name
$ cd working-directory-name
$ repo init -u git://android.git.kernel.org/platform/manifest.git

Synchronizing your client

  • To synchronize the files for all available projects:
$ repo sync

-To synchronize the files for selected projects:

$ repo sync project1 project2 ...
VonC