如何在 github 上直观地查看两个 git 提交之间的差异

How to visually see diff between two git commits on github

我知道我可以 运行 在本地使用 git 命令在终端中查看它们,但我想在 github 上直观地查看它们。这可能吗?

我希望能够看到两个提交之间的差异,而不是两个分支。

要比较 linguist 存储库中的两个提交 c3a414efaf7c6f,请转到 https://github.com/github/linguist/compare/c3a414e..faf7c6f

请参阅 GitHub 文档中的 Comparing Commits

是 - 您可以通过 compare UI:

比较两个提交
https://github.com/orgname/reponame/compare/<hash1>...<hash2>

您可以通过访问 Commits 选项卡并复制您感兴趣的每个提交的提交哈希来找到哈希值。