Repo Sync a particular folder

自作多情 提交于 2019-12-05 00:58:09

问题


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


回答1:


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 ...


来源:https://stackoverflow.com/questions/2130283/repo-sync-a-particular-folder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!