time-machine is a robust, fail-safe Terminal User Interface (TUI) for navigating and reverting Git states via the reflog. It turns the intimidating wall of text that is git reflog into an interactive, visual timeline associated with a "Safe Revert" mechanism.
- Semantic Parsing: Reflog messages are parsed into readable types (Commit, Checkout, Merge, etc.).
- Relative Time: Timestamps are shown as humans read them (e.g., "2h 30m ago").
- Navigation: intuitive Up/Down arrow navigation through your history.
- Diff Summary: Instantly see a diff summary of the selected state relative to your current working directory.
- Stats: View "Files changed", "Insertions", and "Deletions" at a glance.
- File List: A concise list of modified files.
- Safety Stash: The tool automatically stashes uncommitted changes before any revert action.
- Fail-Safe: Uses
git reset --hardonly after securing your current work. - Feedback: Provides immediate confirmation of the revert and the location of your stashed changes.
cargo install git-time-machine-tuigit clone https://github.com/pronzzz/time-machine
cd time-machine
cargo run| Key | Action |
|---|---|
↑ / ↓ |
Navigate history |
Enter |
Safe Revert to selected state |
q |
Quit |
- Language: Rust 🦀
- UI Framework: Ratatui
- Git Backend: git2-rs (libgit2 bindings) for high-performance operations.
This project is licensed under the MIT License - see the LICENSE file for details.