So, imagine that you just mindlessly committed changes git commit -a
and are not satisfied with the particular content of the commit you created. You can now show the latest commit on your current HEAD with the following:
git show
or
git log -n1 -p
If you want to see a file at a specific commit, you can also do this (where <commitid>
is the commit you're interested in):
git show <commitid>:filename