Recently, I wanted to see what files in a commit changed over here at Tumblr so that we could do some syntax checking.
So I needed to basically see all the files that changed on a merge commit that happened with 2 parents. The following command pulls out all the php files from that merge commit.
git show --pretty="format:" --name-only parent1...parent2 | grep .php | sort | uniq
With this one liner, I have a list of all the different files that changed in the commit, ready to be lint checked. Neat, huh? Git is awesome.