Include parent IDs in output.
Section: Special Selectors and Search
List commits with parents
bash
bash
git rev-list --parents -n 5 HEADLearn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Special Selectors and Search
Youngest commit by message
Find youngest reachable commit with matching message text.
Search all refs by message
Find commits across all refs matching message text.
Commits reachable from right not left
Show commits in feature not in main.