revision

Any expression Git accepts as a name for a commit or other object, such as an ID, a branch name, a tag, HEAD or HEAD~2.

In more detail

Where Git's documentation writes REV or rev you can type any of these. A colon and a path after one, as in HEAD:notes.txt, names a file in that commit's tree, and a colon with nothing before it, as in :notes.txt, names the staged version.

Example

git cat-file -p HEAD:notes.txt

Related terms

Taught in

References