众所周知,因为一些原因,git clone GitHub上的kernel非常慢。除非挂梯子。
可以用一下的办法,先从镜像源中clone kernel,然后再
通过 git remode add name url 命令把原来我们要下载的仓库作为远程仓库添加到本地仓库。在执行
通过 git fetch name 命令抓取远程仓库。
1.从清华的 Tuna Mirror下clone
git clone https://mirrors.tuna.tsinghua.edu.cn/git/linux.git

2.通过 git branch-ar 这个命令,我们可以看到,这个代码仓库有一个 master 分支,并没有各个发布的 stable 版本。

3.通过 git remode add name url 命令把原来我们要下载的仓库作为远程仓库添加到本地仓库
git remote add upkernel https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
kernel的地址:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
Clone
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux.git
4.通过 git fetch name 命令抓取远程仓库
git fetch upkernel
本文介绍了一种提高从GitHub克隆Linux kernel速度的方法。首先从清华Tuna镜像源克隆kernel,然后添加原始仓库为远程仓库并抓取更新。
2125

被折叠的 条评论
为什么被折叠?



