Find likely commit hashes for branch recovery.
Section: Recovering Branches and HEAD States
Search reflog for deleted branch tips
bash
bash
git reflog --all | grep feature-branchExplanation
Search across all reflogs when recovering branch pointers that were deleted or force-updated.
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 Recovering Branches and HEAD States
Restore a branch ref manually
Move a branch ref to a specific commit hash.
Switch to a reflog entry in detached HEAD
Inspect a previous HEAD state without changing refs.
Recover work into a new branch
Create a new branch from a reflog entry without moving current branch yet.
Show reflog for a specific branch
Inspect reference updates for a named branch.