本文介绍了如何使用网络浏览器在git上的特定文件中找到差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于Git Bash,我知道您可以使用以下命令: git diff [--options] [-] [...] ,但我想知道是否有任何方法可以找到使用浏览器的特定文件之间的差异.

I know for Git Bash, you can use this command:git diff [--options] [--] [...] but I want to know if there is any way to find difference between a specific file using browser.

就像我们可以在提交中找到更改一样,但是其中包括所有文件( https: //github.com/github/linguist/compare/c3a414e..faf7c6 )

Like we can find changes in commits, but that includes all files (https://github.com/github/linguist/compare/c3a414e..faf7c6)

我只想查找对一个特定文件的更改.

I just want to find changes to one specific file.

推荐答案

您至少可以(通过浏览器)查看实际涉及给定文件的提交.
为此,您需要访问所述fil的历史"页面 e:

You can at least (through the browser) see commits which actually involved a given file.
For that, you need to access the "History" page of said file:

https://github.com/github/linguist /commits/master/lib/linguist/heuristics.rb

但这不会给您两次提交带来任何区别.

But that does not give you any diff between two commits.

另一种解决方法是至少获取该文件的非官方视图.

Another workaround is at least to get to the blame view of that file.

https://github.com/github/linguist /blame/master/lib/linguist/heuristics.rb

对于此处显示的任何差异,您可以单击并查看该行的先前修订信息,包括谁提交了更改以及何时提交.

For any diff shown here, you can click and see the previous revision information for that line, including who committed the change and when.

这篇关于如何使用网络浏览器在git上的特定文件中找到差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-03 13:31