Avi Thour
Avi Thour

Reputation: 410

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

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.

Upvotes: 3

Views: 4288

Answers (1)

VonC
VonC

Reputation: 1324188

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

Upvotes: 1

Related Questions