In order to compare two branches easily, you have to use the “git diff” command and provide the branch names separated by dots.

$ git diff branch1..branch2

Using this command, Git will compare the tip of both branches (also called the HEAD) and display a “diff” recap that you can use to see modifications. In short, it will show you all the commits that “branch2” has that are not in “branch1”