2010-05-20 72 views
31

在Android的主要網站以下方向拉下來源,我看這個命令初始化回購的蛋糕分支:如何在Android源代碼樹中顯示可用分支?

repo init -u git://android.git.kernel.org/platform/manifest.git -b cupcake

我如何可以查看所有可用的分支機構除了蛋糕,即閃電,甜甜圈等...?

回答

27

它似乎並沒有使用「回購」的腳本是可能的,但你可以使用Git查詢可用分支列表:

$ git clone https://android.googlesource.com/platform/manifest.git 
$ cd manifest 
$ git branch -r 

如果你不想克隆庫只是這個,你可以看到web interface上的分支。

+5

[Git web interface](http://android.git.kernel.org/?p=platform/manifest.git;a=heads)適用於不想克隆git存儲庫的人只是爲了查看哪些分支可用。 – 2010-09-15 00:42:49

+3

@CristianCiupitu你的鏈接似乎被打破。這裏是新的鏈接:https://android.googlesource.com/platform/manifest – gsingh2011 2012-08-23 05:55:27

+0

@ gsingh2011:謝謝!現在我有了在回答中提及位置所需的聲望,所以評論不會堆積在每一個變化上。 – 2012-08-24 00:11:19

15

清單已作爲repo init進程的一部分檢出。要獲取可用分支的列表, (從Android回購結帳根),使用這個命令:

git --git-dir .repo/manifests/.git/ branch -a 
+2

看來,清單git位置的位置已經改變: 「git --git-dir .repo/manifests.git/branch -a」 – 2012-03-04 10:10:24

29

列出無需克隆有用的分支的最快捷方式/下載任何東西是這樣的一行代碼:

$ git ls-remote -h https://android.googlesource.com/platform/manifest.git 
1

對於日您已執行repo sync的電子倉庫。你可以在你的本地目錄.repo/manifests找到它們。假設您檢查aosp~/aosp

$ cd ~/aosp/.repo/manifests 
$ git branch -r