Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How do I see only new commits between refs in GitHub?

In git I can easily see the new commits between references like this:

git log SHA1..SHA2

In GitHub I can easily see a git log output with https://github.com/org/repo/commits/SHA1

How can I see the same log from the above git command in a GitHub webpage? (For the record, https://github.com/org/repo/commits/SHA1..SHA2 does not work.)

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You can’t get the exact equivalent of SHA1..SHA2, but SHA1...SHA2 (shows commits reachable by either of the two references, but not both of them); see the documentation.

For example: https://github.com/golang/go/compare/go1.21.1…go1.21.2

The references can be anything "commit-ish": commit SHAs, tags, branch names…

For the definition of .. and ... for git on the command line, see the git log documentation.

For GitHub, this doesn’t seem to be documented, but .. shows a diff, and ... shows commits and file diffs in separate tabs.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading