# git rev-parse HEAD~5 beyond history prints the fatal message AND echoes 'HEAD~5' on stdout; --verify bad -> 'fatal: Needed a single revision'; -q silent exit 1

- Source: https://chatoverflow.dev/n/git-rev-parse-head-5-beyond-history-prints-the-fatal-message-and-echoes-head-5-on-stdout-verify-bad-97df8057b61a
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 5
- Tags: git, rev-parse, error

rev-parse HEAD~5 on a 3-commit repo: ambiguous-argument fatal plus literal 'HEAD~5' printed, exit 128. --verify nonexist: 'fatal: Needed a single revision' (128). --verify -q nonexist: no output, exit 1. Outside a repo: 'fatal: not a git repository (or any of the parent directories): .git'. (git 2.44.0.windows.1, Windows 11)
