Showing which files have changed between two revisions

To compare the current branch against main branch:

$ git diff --name-status main

To compare any two branches:

$ git diff --name-status firstbranch..yourBranchName

There is more options to git diff in the official documentation (and specifically --name-status option).


Try

$ git diff --stat --color master..branchName

This will give you more info about each change, while still using the same number of lines.

You can also flip the branches to get an even clearer picture of the difference if you were to merge the other way:

$ git diff --stat --color branchName..master