The VC package is built into Emacs and provides some basic support for browsing file versions, browsing logs, checking out, committing, etc. VC commands are bound to
C-x v by default.
There are several commands to access other revisions. If you know what revision you want to open, press
C-x v ~ (
vc-revision-other-window). To open the last revision that changed a given line, press
C-x v g (
vc-annotate), and press
vc-annotate-find-revision-at-line) on the desired line. If you want to find and open a revision based on its log message, run
C-x v l (
vc-print-log) and press
log-view-find-revision) when the cursor is on the desired commit.
If you're interested in the changes between two commits, you can directly show a diff with
C-u C-x v = (
vc-diff with a prefix argument — by default it compares the current content of the file with the committed version). To see the differences in Emacs's Ediff interface, run
M-1 M-x vc-ediff RET (
vc-ediff with a prefix argument). You can also view a diff with the current content quickly from the annotate or log buffer with
d, but there's no convenient access to Ediff from there. A convenient way to reach Ediff is to arrange for both versions to be open, and run
ediff-buffers, which prompts for the buffers to compare and defaults to the current buffer and the previously selected buffer.
The external package Magit has a much more complete interface to Git than VC. It's very useful for interfacing with Git, but not particularly helpful when you're focused on one file in particular and not checking out or committing.