I want a diff of all changes in a branch that is not merged to master yet.
I tried:
git diff master git diff branch..master git diff branch...master
As also noted by John Szakmeister and VasiliNovikov, the shortest command to get the full diff from master's perspective on your branch is:
git diff master...
This uses your local copy of master.
To compare a specific file use:
git diff master... filepath
Output example: