# git reflog

11 Hacker News commenters recommended git reflog and 3 criticized it, November 2025 to November 2026. It was recommended in 3 of 13 months.

**Verdict:** People recommend it as a safety net for recovering from mistakes, since it records where branches and references pointed, including after rebases and force-pushes.

## Why people recommend it

- Recovers from mistakes and force-pushes (4 comments): "git reflog is your "backup". it contains every commit and the resulting log (DAG) going back 90 days." ([source](https://news.ycombinator.com/item?id=47769949)) "You can recover from almost any mistake, including force-pushed branches." ([source](https://news.ycombinator.com/item?id=47767959)) "No need for that even. Just git reflog and rewind back to any spot your want!" ([source](https://news.ycombinator.com/item?id=48902684))
- Tracks branch and reference history (4 comments): "The reflog stores information about operations that updates branches and other references" ([source](https://news.ycombinator.com/item?id=47765370)) "the reflog does that for you automatically" ([source](https://news.ycombinator.com/item?id=48905088)) "The branch reflog (git reflog or git log -g ) is a lot easier to follow in the case of rebase" ([source](https://news.ycombinator.com/item?id=48903195))
- Saved people stress during rebases (2 comments): "git reflog is probably the Git command that has saved me the most stress." ([source](https://news.ycombinator.com/item?id=48903192)) "git-reflog(1) is the most general solution if you will ever need." ([source](https://news.ycombinator.com/item?id=49056251))

## What people warn about

- Hard to search than history tools (1 comments): "But it's at best much harder to find stuff in the reflog than to simply use git's history browsing tools." ([source](https://news.ycombinator.com/item?id=46600294))
- Hard to pick the right commit (1 comments): "I find it still hard to understand exactly which commit to reset to in the reflog" ([source](https://news.ycombinator.com/item?id=48902890))
- Annoying to use (1 comments): "well git reflog is that, annoying, yes" ([source](https://news.ycombinator.com/item?id=46603820))

## Alternatives hackers recommend

- [Git worktree](https://hackerapproved.com/p/git-worktrees.md): 58 recommend
- [git rebase](https://hackerapproved.com/p/git-rebase.md): 24 recommend
- [git rerere](https://hackerapproved.com/p/git-rerere.md): 19 recommend
- [Git submodules](https://hackerapproved.com/p/git-submodules.md): 14 recommend
- [git add -p](https://hackerapproved.com/p/git-add-p.md): 13 recommend

## Cite as

Hacker Approved, "git reflog", https://hackerapproved.com/p/git-reflog/ (counts from 1,795,640 Hacker News comments, November 2025 to November 2026).
