I am trying to get the source code for the android os. How do I repo sync a particular folder from the master branch?
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".
See also "Where can I browse Android source code on-line?"
Installing Repo:
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
$ mkdir working-directory-name
$ cd working-directory-name
$ repo init -u https://android.googlesource.com/platform/manifest
Synchronizing your client
To synchronize the files for all available projects:
$ repo sync
To synchronize the files for selected projects:
$ repo sync project1 project2 ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With