using git, I want to list all the different revisions of a given file.
Then, I want to choose a particular version and compare it when another.
How can I do
Use the standard GUI tool of git:
gitk --all -- path/to/file
It displays the version history stripped down to the commits that affect path/to/file.
As display mode for the comparison between the current (new) version and the preceding (old) version you can choose:
Additionally, you can select a commit and then right click another commit and choose Diff this -> selected in the context menu. Everything that you wished for.