$ git init
$ echo zero > a
$ git add a
$ git commit -m zero
$ echo other > a
$ git add a
$ git commit -m other
$ echo whatever > a
$ git add a
$ git commit -m whatever
I'm checking out the file as it was when I commited the 2nd time, when the file contained the text other
.
$ git checkout HASH_OF_COMMIT_OTHER a
$ cat a
other
$ git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: a
#
What command should I run on a, so that git will tell at which changeset it currently is? In this case I would like it to show me the hash of the 2nd commit, along with the commit message, if possible.