Skip to content

pronzzz/time-machine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

time-machine ⏳

Rust Ratatui Crates.io License

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.

🚀 Features

1. Visual Reflog Timeline

  • 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.

2. Live Preview Engine

  • 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.

3. Safe Revert ("Time Travel")

  • Safety Stash: The tool automatically stashes uncommitted changes before any revert action.
  • Fail-Safe: Uses git reset --hard only after securing your current work.
  • Feedback: Provides immediate confirmation of the revert and the location of your stashed changes.

🛠️ Installation & Usage

Install via Cargo (Recommended)

cargo install git-time-machine-tui

Build from Source

git clone https://github.com/pronzzz/time-machine
cd time-machine
cargo run

Controls

Key Action
/ Navigate history
Enter Safe Revert to selected state
q Quit

🏗️ Architecture

  • Language: Rust 🦀
  • UI Framework: Ratatui
  • Git Backend: git2-rs (libgit2 bindings) for high-performance operations.

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A robust Terminal User Interface (TUI) for navigating and reverting Git states using the reflog. Built with Rust and Ratatui, it features visual timelines, live diff previews, and a "Safe Revert" mechanism that automatically stashes uncommitted changes before resetting.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages