Before committing code changes locally, I use 'git diff' to view the changes since the last commit. Before pushing up to origin and creating a pull request (PR), I like to check all my changes against master. One quick way is to push it up to origin and create the PR displaying the diff. However what if there is something wrong and you need to make a change? Seems a bit inefficient.
To diff the code against master in terminal (note. master needs to be in sync with origin)
git diff 'git merge-base master branch'..branchName
git diff short hand for the code above
git diff master...branchName