In the original poster's example:
$ git reflog
97df263 HEAD@{0}: commit: I just made my first change to this file. Yay!
4333289 HEAD@{1}: clone: from https://github.com/tswicegood/mysite
HEAD@{n}
simply means the n-th prior position of HEAD
:
HEAD@{0}
means the 0-th prior position of HEAD
.
- In other words, the current position of
HEAD
, so HEAD@{0}
is actually the same as HEAD
.
HEAD@{1}
means the 1st prior position of HEAD
.
HEAD@{2}
means the 2nd prior position of HEAD
, and so on.
More generally, the <reference>@{n}
syntax is shorthand to mean "the n-th prior position of the reference/branch", as I state in my answer to What does the “at” @ sign/symbol/character mean in Git?. So you can use this syntax with any reference/branch, for example:
master@{1}
is the 1st prior position of the master
branch.
origin/master@{1}
is the 1st prior position of the remote-tracking branch origin/master
.
As explained in the official Linux Kernel Git documentation for specifying
Git revisions:
<refname>@{<n>}
, e.g. master@{1}
A ref followed by the suffix "@" with an ordinal specification enclosed in a brace pair (e.g. "{1}", "{15}") specifies the n-th prior value of that ref. For example "master@{1}" is the immediate prior value of master while "master@{5}" is the 5th prior value of master. This suffix may only be used immediately following a ref name and the ref must have an existing log ("$GIT_DIR/logs/").