2010-01-25 66 views

回答

10

Git不支持部分簽出。

您可以嘗試使用git-subtree,在克隆所有回購之後,將該回購部分拆分爲您自己的項目回購。

也就是說,如果你在談論的在Android的「projects」之一,他們是Git的回購協議,並能與工具「repo」進行管理。
參見 「Where can I browse Android source code on-line?

安裝回購:

$ 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 

同步客戶端

要將文件所有可用的項目同步:

$ repo sync 

爲所選項目同步文件:

$ repo sync project1 project2 ... 
+1

我如何列出回購可用的項目? – endryha

+1

@endryha:我已經修復了該答案中的鏈接,並添加了一些信息來源,用於列出Android項目並瀏覽其代碼源。 – VonC

+3

用'repo forall -c'echo「$ REPO_PATH - $ REPO_PROJECT」「'列出所有項目」'有關更多信息,請參閱:https://groups.google.com/a/chromium.org/forum/?fromgroups=# !topic/chromium-os-dev/xBtwK0RqRws – 0x90

相關問題