跳到主要内容

Linux Next Git 镜像使用帮助

linux-next 介绍

与linux其他树不同的是,linux-next树是从子系统树合并补丁的窗口树。

警告

正因为linux-next是临时版本,所以其master分支仅仅代表最新版本, 如果HEAD追踪master分支,在使用git pull更新master时,会出现各种无法预料的错误。

而正确的做法应该是clone主线分支,而把linux-next作为另外一个remote,使用标签去追踪commit。

使用linux-next

  1. 克隆 Linux 源代码,运行
git clone https://mirrors.hust.edu.cn/git/linux.git
  1. linux-next 作为一个新的remote,并更新本地分支和标签
git remote add linux-next https://mirrors.hust.edu.cn/git/linux-next.git
git fetch linux-next
git fetch --tags linux-next
  1. 检出 linux-next 的commit
git tag -l "next-*" | tail

git工具会输出类似下面的结果

next-20231101
next-20231102
...

然后通过tag检出到新的本地分支

git checkout -b new_local_branch next-20231101

最后在本地的new_local_branch开展你的工作。

引用

1 校园网联合镜像站
2 帮助仓库
4 Working with linux-next

选择使用的域名
mirrors.hust.edu.cn
该域名线路为 双栈线路
是否启用HTTPS