Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find diff in a specific file on git using web browser

Tags:

git

github

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.

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.

like image 961
Avi Thour Avatar asked Dec 01 '25 21:12

Avi Thour


1 Answers

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.

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

like image 94
VonC Avatar answered Dec 03 '25 12:12

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!