Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display available branches in Android source tree?

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...?

like image 862
theactiveactor Avatar asked May 20 '10 13:05

theactiveactor


People also ask

How can I see my git branch in Android Studio?

Go to VCS > Git > Branches. “Git Branches” appears. It shows all the local branches and remote branches as well as the “New branch” option. Tip: If you look at the right corner of Android Studio, you also see your current branch — clicking it will also opens the “Git Branches” popup.

What does repo sync do?

If you run repo sync without arguments, it synchronizes the files for all projects. When you run repo sync , this is what happens: If the project has never been synchronized, then repo sync is equivalent to git clone . All branches in the remote repository are copied to the local project directory.


2 Answers

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 
like image 67
Łukasz Sromek Avatar answered Oct 05 '22 03:10

Łukasz Sromek


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.

like image 20
Volker Voecking Avatar answered Oct 05 '22 03:10

Volker Voecking