2

Essentially I am trying to clone this android open source project to my desktop.

https://android.googlesource.com/platform/packages/apps/DeskClock/+/android-4.3_r1

I am not sure what exactly to do.

I have tried:

git clone https://android.googlesource.com/platform/packages/apps/DeskClock/+/android-4.3_r1

But I got the error:

fatal: remote error: Git repository not found

So how would I have to create a repository and clone it in there?

I am just completely unsure on how to do this locally in my desktop.

Rohit Tigga
  • 2,373
  • 9
  • 43
  • 81
  • 1
    The url you are trying to clone is a commit that has been taged not a whole repo. try `https://android.googlesource.com/platform/packages/apps/DeskClock` – kaman Jul 11 '14 at 21:28

3 Answers3

4

The following works for me :

git clone https://android.googlesource.com/platform/packages/apps/DeskClock/

This would download the entire repository. Then you can checkout any branch you want.

Eran
  • 387,369
  • 54
  • 702
  • 768
3

You will want to clone the base repo:

git clone https://android.googlesource.com/platform/packages/apps/DeskClock/

Dive into the directory it just created:

cd DeskClock/

Then you will need to checkout that tag you want to start from

git checkout tags/android-4.3_r1
Chase
  • 9,289
  • 5
  • 51
  • 77
1

First, verify the Git Repository URL you use is correct, as given in the official Git repositories on android

In Android Studio, Go for File > New > Project from Version Control > Git.

Paste the Git Repository URL (Don't include git clone here, only the URL)

Click on Test to verify

This should work, as it did for me. This procedure is simple and straightforward.