To find where your current checkout diverged from the master branch,
base=`git merge-base master HEAD`
echo $base
to find out what files have been changed since then,
git diff --name-only $base HEAD
to show the accumulated difference
git diff $base HEAD
When you want to describe an entire series of commits you can use the syntax in the answer Gabriele Petronella linked above, master..HEAD
is shorthand for HEAD ^master
which means "all commits reachable from HEAD, but not including commits reachable from master". Missing endpoints default to HEAD, so you can say git log --oneline master..