2010-05-20 69 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