I have my master branch and a dev branch that I periodically merge to master:
dev --A---B---C---D---E---F---G--
/ \ \
master ----------M1------M2----------
M1 and M2 are merge commits.
How can I find the SHA of the last commit on dev that has been merged into master? In this example, I want the SHA of commit D.