IntelliJ: Viewing diff of all changed files between local and a git commit/branch
This has now been implemented. In order to compare two branches you do:
- Check out one of the branches you want to compare with.
- Select the branch you want to compare with in the Git branch popup in the status bar in the bottom right of the IntelliJ window. A popup with some options is shown.
- Select the "Compare" option.
- This by default shows all the commits you can also select the "Diff" tab to show the actual changes.
This is all described in much greater detail in one of their blog posts.
Though Jon Tirsen's answer is correct, you need to go through entire text in order to understand how to do that.
Here's the images of the same in mac.
- I am currently working with hello_world and want to compare with master.
UPDATE: In the new UI, click on Show Diff with Working Tree
- Next a window will pop up. Select
Files
and presscmd + d
- Another window which shows diff. You can perform many different types of diff. Use
cmd + shift + ]
andcmd + shift + [
to shift between files.
Diff Tip: IntelliJ provides advanced diff features. You can check those on the 3rd image.
This has been changed in the 2020 version update:
You now need to do the following:
Checkout one of the branches you want to compare.
Open the Branches menu.
Select the other branch you want to compare with.
Select "Show Diff with Working Tree".