Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Comparison Tool in GitHub (compare releases, or shas if necessary)

Tags:

git

github

diff

Can someone recommend a comparison tool/add-on/ in GitHub. I'd like to see the code changes between two particular releases. It would be nice if it showed all the files that have changed and I could then drill down into each file of interest.

This link: https://github.com/blog/612-introducing-github-compare-view said there already is one in GitHub, but I can't see the "compare" button they refer to. The post is from 2010 so perhaps the feature was removed.

If there is nothing in for GitHub, perhaps some direction on just using Git to list all the files that have changed between the two releases. Then I'd need a way to see what those changes are for each file. Frankly though, this seems like something that would be a pain on the command line!

Thanks, Dave

like image 251
Dave Avatar asked Dec 07 '25 05:12

Dave


2 Answers

Starting January 2020, you now have "a shortcut to compare across two releases":

You can now compare tags between two releases – in order to determine what changes have been made – by clicking on the Compare ▾ button for a given release.

GitHub Release Comparison

That give you a URL like https://github.com/go-gitea/gitea/compare/v1.11.0-rc1...release/v1.11


Oct. 2023, you also have gh compare

like image 172
VonC Avatar answered Dec 09 '25 23:12

VonC


Github supports the split view in compare pages. Just add ?diff=split to the url and you'll be fine. E.g. https://github.com/rails/rails/compare/v5.0.2.rc1...v5.0.2?diff=split. Github remembers your preferred comparison view. To reset it, write ?diff=unified instead.

like image 26
knugie Avatar answered Dec 09 '25 23:12

knugie



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!