Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Repo Sync a particular folder

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

like image 802
Gidiyo Avatar asked Dec 10 '22 17:12

Gidiyo


1 Answers

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 ...
like image 144
VonC Avatar answered Dec 20 '22 11:12

VonC