Github diffing a File over two Branches Nov 11, 2018 A fairly common situation when working on a feature branch is the need to compare it to the master branch. This can be easily done by: git diff one_branch..master -- fileOfInterest.js The -- separator indicates the end of the command line flags.