Skip to content

Add 'panic mode' - quick undo last N minutes #12

Description

@dinakars777

Description

Add a quick "panic mode" that lets users instantly undo all changes from the last N minutes.

Suggested Implementation

  • Add --panic <minutes> CLI flag
  • Automatically find the reflog entry from N minutes ago
  • Show confirmation: "Restore to state from 15 minutes ago?"
  • Execute restore without opening full TUI

Example Usage

git-time-machine --panic 15  # Undo last 15 minutes
git-time-machine --panic 60  # Undo last hour

Technical Details

  • Add panic field to Cli struct
  • Parse reflog timestamps
  • Find first entry older than N minutes
  • Show simple confirmation prompt
  • Execute git reset --hard

Why This is a Good First Issue

  • Small, focused feature
  • Minimal UI changes
  • Good introduction to CLI argument handling
  • Clear acceptance criteria

Related to roadmap item: 'Panic mode' - undo last N minutes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions