empty folder after git clone

9,369 views
Skip to first unread message

sinatosk

unread,
Dec 26, 2011, 8:14:35 AM12/26/11
to Android Linux Kernel Development
at http://source.android.com/source/downloading.html there are a list
of URL's to clone the android kernels from...

everytime I do "git clone https://android.googlesource.com/kernel/samsung.git"...
the folder is empty...

I've tried it numerous times ( using Archlinux and Ubuntu as they both
have different version's of git in their repository )

Is there something wrong with the Google's repository?

I have tried

$ git clone https://android.googlesource.com/kernel/common.git
$ git clone https://android.googlesource.com/kernel/omap.git
$ git clone https://android.googlesource.com/kernel/samsung.git

and all three are the same with just a ".git" inside and nothing
else...

I've cloned the android framework folder fine with no issues using the
"repo" script

Dharam Kumar

unread,
Dec 26, 2011, 8:43:40 AM12/26/11
to android...@googlegroups.com
Hi,

Everything is out there in .git folder only.

By default, these URLs for cloning will put the .git stuff in your local folder. As you have not mentioned any remote branch name while cloning , hence,
it would not checkout the files in your local repository.

All you need to do is to checkout correct remote branch to get all the files in the local repository.

Do a  "git branch -r" to see what remote branches are available.

If it shows a list of remote branches, create and checkout a local branch using:

                git checkout -b <local_branch_name> <remote_branch_name>

Let me know, if it works. :)

-
Dharam


Jerome Clarke

unread,
Dec 26, 2011, 9:05:33 AM12/26/11
to android...@googlegroups.com
I was browsing around in another group... then I realized I forgot about the "branch" command

this is what I did based from another thread I read

"git branch -a" to see a list of branches

and then "git checkout remotes/origin/android-samsung-3.0-ics-mr1"

it's been awhile since I've used git... better re-read some of git book again... just wondering whats the difference between "git checkout" and "git checkout -b" :p

Thanks Dharam

Dharam Kumar

unread,
Dec 26, 2011, 9:41:42 AM12/26/11
to android...@googlegroups.com

git checkout <branch_name> : simple checking out the "branch_name" or switching to the "branch_name". It does not create any new branches.


git checkout -b <branch_name_1>  <branch_name_2> : will create and checkout a branch "branch_name_1" from other branch "branch_name_2". 

regards
-Dharam


--

Jerome Clarke

unread,
Dec 26, 2011, 10:30:46 AM12/26/11
to android...@googlegroups.com
Thanks again...

yeah I just want to look at the source code so I understand how things are working

Raji mobby

unread,
Jul 12, 2012, 2:30:59 AM7/12/12
to android...@googlegroups.com
Im really thankfull to you guys....,I had learn from your conversation and download the source tree as below as.


Thank u guys. 
Reply all
Reply to author
Forward
0 new messages