如何比较github同一分支上的两个不同提交? [英] How to compare two different commits on the same branch in github?
问题描述
在 GitHub 上比较同一分支上的历史记录对我来说非常混乱.我经常为此挣扎:
Comparing histories on the same branch is very confusing for me on GitHub. I struggle with this regularly:
如果我在 GitHub 存储库名称后的 URL 中使用 compare/master
,我可以根据下拉菜单中的选项与存储库中的其他分支进行比较.
If I use compare/master
in the URL after the GitHub repo name, I can compare against other branches in the repo based on the options in the drop-down menus.
https://help.github.com/en/articles/跨时间比较提交
然而,我通常想比较 master 上的几次提交.
However, I usually want to compare several commits on master.
这是如何轻松完成的?我能举个更清楚的例子吗?
How is this easily done? Could I get a more clear example?
推荐答案
您可以使用以下 URL 结构来比较同一分支中的提交:
You can use the following URL structure to compare commits in the same branch:
github.com/<username>/<repo_name>/compare/<commit1>...<commit2>
替换 username
、repo_name
、commit1
和的值commit2
acc.到您的项目.
Replace values for username
, repo_name
, commit1
& commit2
acc. to your project.
两次提交之间的分隔符是 ...
即 3 点
.
The separator between the two commits is ...
i.e. 3 dots
.
这篇关于如何比较github同一分支上的两个不同提交?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!