今天我成功克隆了一个Git repo(我希望),但是我无法在克隆目录中看到任何源文件。具体而言,我使用以下命令克隆了来自Google的msm-kernel
回购:
git clone https://android.googlesource.com/kernel/msm.git kernel_msm
答案 0 :(得分:5)
此回购的主分支是空的。你需要检查一下正确的分支:
$ 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
$
答案 1 :(得分:1)
显然,master没有文件。你必须结帐分行:
git checkout --track -b android-msm-2.6.35 origin/android-msm-2.6.35