Using IntelliJ's diff viewer is a very nice way to review code because you can make changes in your local version with all the capabilities of the IntelliJ code editor (refactoring, completion, etc).
Unfortunately I have not worked out how to do the most important thing when you're doing code reviews in IntelliJ, namely: Looking at the diff of all the changed files in the working tree (checked out to the branch you want to merge from) and another branch (the branch you plan to merge into, e.g. "master).
Does anyone know how to do this?
To open the Diff & Merge page, open settings by pressing Ctrl+Alt+S and navigate to Tools | Diff & Merge. Click this button to scroll both differences panes simultaneously.
Compare the current revision of a file or folder with a revision in the same branch Select a file or a folder in the Project tool window, and choose <your_VCS> | Compare With from the context menu. Choose a revision you want to compare the current file or folder version with from the dialog that opens.
IntelliJ IDEA lets you review the state of your project at a selected revision. Open the Git tool window Alt+9 and switch to the Log tab. Select a commit and choose Show Repository at Revision from the context menu.
Find what file changed in a commit To find out which files changed in a given commit, use the git log --raw command.
This has now been implemented. In order to compare two branches you do:
This is all described in much greater detail in one of their blog posts.
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