How to display available branches in Android source tree?

假如想象 提交于 2019-12-02 15:49:25
Volker Voecking

It doesn't seem to be possible using the "repo" script, but you can query the list of available branches using git:

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

If you don't want to clone the repository just for this, you can see the branches on the web interface.

Łukasz Sromek

The quickest way to list available branches without cloning/downloading anything is this one-liner:

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

The manifests are already checked out as part of the repo init process. To get a list of available branches, (from your android repo checkout root), use this command:

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

See list of "Codenames, Tags, and Build Numbers" at http://source.android.com/source/build-numbers.html

git access is refused

For the repository you have perform repo sync. You can find them in your local directory .repo/manifests. Suppose you check aosp to ~/aosp.

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

Assuming at the top of an AOSP tree, a list of tags can be shown either,

$ git --git-dir .repo/manifests.git tag -l

or

$ (cd .repo/manifests; git tag -l; )

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