How do you compare two revisions of a file, or your current file and a previous revision?
Compare command is git diff
.
To compare 2 revisions of a file:
$ git diff
That diffs commit1 against commit2; if you change order then files are diffed the other way round, which may not be what you expect...
To compare current staged file against the repository:
$ git diff --staged
To compare current unstaged file against the repository:
$ git diff