如何在github中的同一分支上比较两个不同的提交? [英] How to compare two different commits on the same branch in github?

查看:232
本文介绍了如何在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>

替换usernamerepo_namecommit1& commit2 acc.进入您的项目.

Replace values for username, repo_name, commit1 & commit2 acc. to your project.

两次提交之间的分隔符为...,即3 dots.

The separator between the two commits is ... i.e. 3 dots.

这篇关于如何在github中的同一分支上比较两个不同的提交?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆