I would like to do a diff between two tags and committed changes between those two tags. Could you please tell me the command?
You can compare files between two Git commits by specifying the name of the ref that refers to the commits you want to compare. A ref may be a commit ID or HEAD, which refers to the current branch. Let's compare two commits in our Git repository. The above command will perform a diff operation across our two commits.
You can access the "Compare branches/tags" page from the branch or the tag page. Choose the branches or tags that you want to compare. Commits tab shows the differences of commits between the branches or the tags. Files tab shows the differences of files between the branches or the tags.
$ git diff tag1 tag2
or show log between them:
$ git log tag1..tag2
sometimes it may be convenient to see only the list of files that were changed:
$ git diff tag1 tag2 --stat
and then look at the differences for some particular file:
$ git diff tag1 tag2 -- some/file/name
A tag is only a reference to the latest commit 'on that tag', so that you are doing a diff on the commits between them.
(Make sure to do git pull --tags
first)
Also, a good reference: https://git-scm.com/docs/git-diff
If source code is on Github, you can use their comparing tool: https://help.github.com/articles/comparing-commits-across-time/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With