简体   繁体   English

如何在github上直观地看到两个git commit之间的差异

[英]How to visually see diff between two git commits on github

I understand I can run a git command locally to see them in the terminal, but I want to see them visually on github. 我知道我可以在本地运行git命令在终端中查看它们,但是我想在github上直观地看到它们。 Is this possibly? 这可能吗?

I want to be able to see the diff between two commits, NOT two branches. 我希望能够看到两个提交之间的差异,而不是两个分支之间的差异。

To compare the two commits c3a414e and faf7c6f from the linguist repository go to https://github.com/github/linguist/compare/c3a414e..faf7c6f . 要比较linguist库中的两个提交c3a414efaf7c6f ,请访问https://github.com/github/linguist/compare/c3a414e..faf7c6f

See Comparing Commits in the GitHub documentation. 请参阅GitHub文档中的比较提交

Yes - you can compare two commits via the compare UI: 是的-您可以通过compare UI比较两个提交:

https://github.com/orgname/reponame/compare/<hash1>...<hash2>

You can find the hash values by visiting the Commits tab and copying the commit hash for each commit you're interested in. 您可以通过以下方式找到哈希值:访问“ Commits选项卡,然后为您感兴趣的每个提交复制提交哈希。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM