If I want to see how foo.bar looked like in some certain commit then I can invoke:
foo.bar
git show :foo.bar
The canonical way to do that in Emacs is to use VC: C-x v ~ from the file's buffer will ask you for a revision and then show that file as it was at that revision. It should work for any control system supported by VC, such as Git, Bzr, ...
C-x v ~