如何查看特定版本的 Github 存储库中的代码?

How to view code in a Github repository as of a specific release?

我想查看特定版本的整个存储库中的代码是什么样的。例如,我想查看 Apache Airflow 1.10.6 版本的代码。

我可以在此处找到该版本的摘要,但不知道如何获取此版本的相关代码:https://github.com/apache/airflow/releases/tag/1.10.6rc1

也许甚至可以在本地执行此操作(虽然我认为 git 本身没有 "release" 的概念)?

我想做的事情有意义吗?

带圆圈的 link 应该会将您带到该代码的特定快照。

每个 GitHub 版本都与一个 git 标签相关联。你要找的标签可以在发布URL中看到。比如你问题中的URL,https://github.com/apache/airflow/releases/tag/1.10.6rc1,对应标签1.10.6rc1.

要在本地结帐标签,您只需要:

git checkout <tag-name>

在给定的例子中,

git checkout 1.10.6rc1

有关详细信息,git 的 this thread discusses the difference between a git tag and a GitHub release. You can read more about git tags in the official documentation

跟随这些点击的最简单方法