Overview
To compare two saved states, use:
git diff <commit-id-1> <commit-id-2>
The output identifies changed files and shows added and removed lines. Reversing the order of the commit identifiers reverses the comparison perspective.
This makes commit IDs useful for more than navigation. They also let you inspect precisely how the project changed between two points in history.
When Git opens a paged log or diff view, press Q to exit that view and return to the normal terminal prompt.