22

In github, is it possible to show the diff of a single file between two commits?

One can readily diff two commits, and it is possible to link to the anchor for a specific file in those two commits, but all files are included in that view. For example, https://github.com/adamginsburg/APEX_CMZ_H2CO/compare/a94a962db51e0f4e73ec3ba4170a0ca8269548da...adamginsburg:master#diff-22

I would like a similar view, but without the other files.

(I know how to do this on the command line with git, but I want to share this link with collaborators, so the command line approach is not relevant for this question)

3
  • possible duplicate of How can I generate a diff for a single file between two branches in github Commented Aug 25, 2015 at 15:38
  • 3
    1 year later I'm trying to do the same... guess still can't be done using github... sad thing Commented Oct 26, 2016 at 23:00
  • 3
    I think this is not a duplicate. comparing files across branches is different than selecting endpoints in history in a single branch for one file. Commented Sep 21, 2017 at 12:45

1 Answer 1

5

I think your question can be consider a duplicate of this one :

How can I generate a diff for a single file between two branches in github

Unfortunately, the accepted answer doens't answer your expected behavior.

I really tried to exclude the other files without success, and since there not seems to have other means to filter it out but html anchor pointer, I guess what you already have is what best available with Github to pin point the change you want to talk about with your peers.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.