如何使用Web浏览器在git上的特定文件中查找diff

问题描述 投票:3回答:1

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

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

我只是想找到一个特定文件的更改。

git github
1个回答
1
投票

您至少可以(通过浏览器)查看实际涉及给定文件的提交。 为此,您需要访问"History" page of said file:

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

但这并没有给你两次提交之间的任何差异。

另一种解决方法是至少要找到该文件的责备视图。

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

对于这里显示的任何差异,你可以click and see the previous revision information for that line, including who committed the change and when

https://cloud.githubusercontent.com/assets/3477155/21945511/a5145ddc-d9a9-11e6-9723-85f8c498139b.gif

© www.soinside.com 2019 - 2024. All rights reserved.