git-revisions-syntax

Installation
SKILL.md

Git Revision Syntax

Single Commits

Syntax Meaning
abc123 SHA prefix (≥4, unambiguous)
HEAD / @ current commit
HEAD^ first parent
HEAD^2 second parent (merge's other side)
HEAD~N walk N steps along first parent
HEAD~3^2 chained: grandparent's merge sibling
HEAD@{2} 2 reflog entries ago
HEAD@{yesterday} / @{2.weeks.ago} reflog by time
@{-1} previously checked-out branch
@{u} / @{push} upstream / push target
tag^{} deref annotated tag to commit
:/fix typo newest commit whose msg matches regex
Installs
19
First Seen
Apr 18, 2026