Reputation: 63042
I looked at a few results for how to do the task in the title. One of the most popular is an SOF answer here:
https://stackoverflow.com/a/49642681/1056563
In particular there is this popup shown:
However when I do apparently the same process the popup does not include those compare
options:
What do I need to do to get the compare commits option? I am on Intellij Ultimate 2020.2
on macOS.
Update The (now rather tentatively..) accepted answer refers to a link to Compare Versions
. Here is my attempt to replicate those instructions. However there is no "compare versions" option afaict:
Upvotes: 2
Views: 690
Reputation: 82
Review the differences between two commits (From IntelliJ docs)
IntelliJ IDEA allows you to check which files were modified between two commits instead of having to browse the changes in each commit in between.
Select any two commits in the Log tab of the Git tool window ⌘(Сmd) 9 and choose the 2 commits you want to compare Versions from the context menu.
The Changes tool window with a list of files modified between the selected commits opens.
You can view the diff for any file by clicking the Show diff icon or pressing ⌘(Сmd) D.
Upvotes: 1
Reputation: 2405
If you would like to compare two commits in IDE then please open Git toolwindow, find in a log desired commits, select them while holding Ctrl and then you can hit cmd/Ctrl+D or right-click and choose "Compare version". Please see more here about commit and history review
Upvotes: 2