See what would be pruned from reflog without changing anything.
Section: Reflog Basics
Preview reflog expiration impact
bash
bash
git reflog expire --expire=30.days --all --dry-runExplanation
Mostly administrative, but useful when troubleshooting object reachability and retention.
Learn 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 Reflog Basics
Show reflog for a specific branch
Inspect reference updates for a named branch.
Restore branch to a reflog entry
Move the current branch back to a previous recorded state.
Set default reflog retention
Customize how long normal reflog entries are retained.
Recover work into a new branch
Create a new branch from a reflog entry without moving current branch yet.