Many Git commands take revision parameters as arguments. Depending on the command, they denote a specific commit or, for commands which walk the revision graph (such as git-log(1)), all commits which can be reached from that commit. They are usually denoted as <commit>
, or <rev>
, or <revision>
in the syntax description.
The reference documentation for Git revisions syntax is the gitrevisions(7) manpage.
Still missing from this page:
git describe
, e.g. v1.7.4.2-679-g3bee7fb
@
alone as a shortcut for HEAD
@{-<n>}
, e.g. @{-1}
, and -
meaning @{-1}
<branchname>@{push}
<rev>^@
, for all parents of <rev>
Needs separate documentation:
<rev>:<path>
and :<n>:<path>
syntaxA..B
, A...B
, B ^A
, A^1
, and revision limiting like -<n>
, --since