今天,我成功克隆了一个Git存储库(希望如此),但是在克隆的目录中看不到任何源文件。具体来说,我使用以下命令从Google克隆了msm-kernel存储库:

git clone https://android.googlesource.com/kernel/msm.git kernel_msm

最佳答案

此仓库的主分支为空。您需要 checkout 正确的分支:

$ git branch -a
* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/android-msm-2.6.35
  remotes/origin/master
$ git checkout android-msm-2.6.35
Checking out files: 100% (33866/33866), done.
Branch android-msm-2.6.35 set up to track remote branch android-msm-2.6.35 from origin.
Switched to a new branch 'android-msm-2.6.35'
$ ls
COPYING     MAINTAINERS arch        firmware    ipc     net     sound
CREDITS     Makefile    block       fs      kernel      samples     tools
Documentation   README      crypto      include     lib     scripts     usr
Kbuild      REPORTING-BUGS  drivers     init        mm      security    virt
$

10-06 06:55