34

Following directions on Android's main website to pull down sources, I'm looking at this command to initialize repo for the cupcake branch:

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

How can I view all available branches besides cupcake, i.e eclair, donut, etc...?

Janusz
  • 187,060
  • 113
  • 301
  • 369
theactiveactor
  • 7,314
  • 15
  • 52
  • 60

6 Answers6

34

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
Edd
  • 3,724
  • 3
  • 26
  • 33
Łukasz Sromek
  • 3,637
  • 3
  • 30
  • 43
29

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.

Andrew
  • 15,357
  • 6
  • 66
  • 101
Volker Voecking
  • 5,203
  • 2
  • 38
  • 35
  • 6
    [Git web interface](http://android.git.kernel.org/?p=platform/manifest.git;a=heads) for the people who don't want to clone the git repository just to see what branches are available. – Cristian Ciupitu Sep 15 '10 at 00:42
  • 3
    @CristianCiupitu Your link seems to be broken. Here's the new link: https://android.googlesource.com/platform/manifest – gsgx Aug 23 '12 at 05:55
  • @gsingh2011: thanks! Now I have the reputation required to mention the location in the answer, so that comments don't pile up on every change. – Cristian Ciupitu Aug 24 '12 at 00:11
18

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
Mark Renouf
  • 30,697
  • 19
  • 94
  • 123
6

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

git access is refused

2

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
alijandro
  • 11,627
  • 2
  • 58
  • 74
0

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; )

Tzunghsing David Wong
  • 1,271
  • 14
  • 10