Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Downloading a specific branch of App from googlesource [duplicate]

Tags:

git

After searching a lot I ask this.

I want to download the app source code from this url: https://android.googlesource.com/platform/packages/apps/Gallery2/+/ics-mr1

git clone https://android.googlesource.com/platform/packages/apps/Gallery2/+/ics-mr1 does not work.

git clone https://android.googlesource.com/platform/packages/apps/Gallery2/ works just fine.

What should I do to download the specific branch?

like image 379
Avijit Avatar asked Nov 05 '25 09:11

Avijit


1 Answers

Git clone download all the project, with --branch option:

--branch , -b Instead of pointing the newly created HEAD to the branch pointed to by the cloned repository’s HEAD, point to branch instead. In a non-bare repository, this is the branch that will be checked out.

git clone --branch ics-mr1 https://android.googlesource.com/platform/packages/apps/Gallery2

Hope this helps!

like image 111
cortex Avatar answered Nov 08 '25 05:11

cortex