git-time-machine 0.2.0

๐Ÿ•ฐ๏ธ A beautiful TUI to undo ANY git mistake in 3 seconds
git-time-machine-0.2.0 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.

Crates.io License: MIT

โœจ The Problem

You just:

  • ๐Ÿ”ฅ Force pushed and lost commits
  • ๐Ÿ’ฅ Did git reset --hard by 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

Demo GIF

Navigate your git history like a time traveler. One key to restore.

๐Ÿ“ฆ Installation

Cargo (Recommended)

cargo install git-time-machine

From Source

git clone https://github.com/dinakars777/git-time-machine
cd git-time-machine
cargo install --path .

Homebrew (Coming Soon)

brew install git-time-machine

๐ŸŽฎ Usage

# Launch in any git repository
git-time-machine

# Show all reflog entries (default: last 50)
git-time-machine --all

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:
git reset --hard HEAD~5

# No problem:
git-time-machine
# Navigate to "6m ago", press Enter
# All commits restored โœจ

Scenario 2: Deleted Branch

# Deleted the wrong branch
git branch -D feature-branch

# Recover it:
git-time-machine
# Find the last commit on that branch
# Press Enter, then:
git checkout -b feature-branch

Scenario 3: Bad Rebase

# Rebase went wrong
git rebase main
# Conflicts everywhere...

# Undo it:
git-time-machine
# Go back to before rebase
# Press Enter, start over

๐Ÿ› ๏ธ How It Works

git-time-machine is a beautiful wrapper around git reflog that:

  1. Parses your reflog history
  2. Displays it in an interactive TUI
  3. Lets you preview and restore any state
  4. Executes git reset --hard <hash> when you press Enter

It's just git under the hood - no magic, no risk.

๐ŸŽจ Why This Will Go Viral

  1. Solves a universal pain - Everyone screws up git
  2. Visual + Interactive - Makes reflog actually usable
  3. Instant gratification - Save yourself once = hooked
  4. Beautiful demos - TUI looks amazing in GIFs
  5. Trending tech - Rust + TUI tools are hot right now

๐Ÿค Contributing

Contributions welcome! This is a weekend project that could become something big.

Ideas for v2:

  • 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