git-time-machine-0.2.2 is not a library.
๐ฐ๏ธ git-time-machine
Undo ANY git mistake in 3 seconds with a beautiful TUI
Never lose work again. git-time-machine makes git reflog visual, interactive, and actually usable.
โจ The Problem
You just:
- ๐ฅ Force pushed and lost commits
- ๐ฅ Did
git reset --hardby accident - ๐๏ธ Deleted a branch you needed
- ๐คฆ Rebased wrong and broke everything
- ๐ฑ Can't remember what you did 5 minutes ago
Current solution: Dig through git reflog, copy cryptic hashes, pray you picked the right one.
Better solution: git-time-machine ๐ฏ
๐ Demo

Navigate your git history like a time traveler. One key to restore.
๐ฆ Installation
Cargo (Recommended)
From Source
Homebrew (Coming Soon)
๐ฎ Usage
# Launch in any git repository
# Show all reflog entries (default: last 50)
Controls
| Key | Action |
|---|---|
โ / k |
Move up |
โ / j |
Move down |
Enter |
Restore to selected state |
q / Esc |
Quit |
๐ฏ Features
- โ Visual Timeline - See your entire git history at a glance
- โ Relative Timestamps - "5m ago", "2h ago", "yesterday"
- โ One-Key Restore - Press Enter, done
- โ Vim Keybindings - j/k navigation
- โ Beautiful TUI - Built with Ratatui
- โ Lightning Fast - Written in Rust
- โ Zero Config - Just worksโข
๐ฅ Use Cases
Scenario 1: Accidental Reset
# Oh no! You did this:
# No problem:
# Navigate to "6m ago", press Enter
# All commits restored โจ
Scenario 2: Deleted Branch
# Deleted the wrong branch
# Recover it:
# Find the last commit on that branch
# Press Enter, then:
Scenario 3: Bad Rebase
# Rebase went wrong
# Conflicts everywhere...
# Undo it:
# Go back to before rebase
# Press Enter, start over
๐ ๏ธ How It Works
git-time-machine is a wrapper around git reflog that:
- Parses your reflog history
- Displays it in an interactive TUI
- Lets you preview and restore any state
- Executes
git reset --hard <hash>when you press Enter
It's just git under the hood - no magic, no risk.
๐ค Contributing
Contributions welcome!
Ideas for future versions:
- Show file diffs inline
- "Panic mode" - undo last N minutes
- Branch visualization
- Stash recovery
- Search/filter commits
- Export timeline as JSON
๐ License
MIT ยฉ Dinakar Sarbada
๐ Star History
If this saved you once, give it a star! โญ
Made with โค๏ธ and Rust | Report Bug | Request Feature