From claude-ultra
Undo last file change and restore previous git state with confirmation
npx claudepluginhub nategarelik/claude-ultra-plugin --plugin claude-ultra# Rollback: $ARGUMENTS Preparing to undo recent file modifications and restore to previous state. ## Rollback Protocol ### Phase 1: Analyze Current State 1. Check git status for uncommitted changes 2. Review the last file(s) modified 3. Show what will be reverted ### Phase 2: Preview Changes Display what will happen: ### Phase 3: Confirm Rollback **REQUIRES CONFIRMATION** - This is destructive! ### Phase 4: Execute Rollback Execute based on scope: **Option A: Discard uncommitted changes only** **Option B: Revert last commit (keeps history)** **Option C: Reset to previou...
/rollbackRolls back the most recent database migration or to a specific version, with data loss warnings, explicit confirmation, transactional execution, schema verification, and status report.
/rollbackReverts to a previous Shipyard checkpoint via git: state-only (.shipyard/ files) or full (code + state). Supports --list flag and creates safety checkpoint first.
/rollbackSafely rollbacks a failed or unwanted feature by invoking /specswarm:rollback with optional flags (--dry-run, --keep-artifacts, --force).
/rollbackRemoves all claudex state files (.state, .lock, -runner.sh, -prompt.txt) from .claude/claudex/ to resolve stuck loops. Preserves log for debugging.
/rollbackRollbacks orchestrator project state to a specified checkpoint ID, restoring task status and optionally resetting Git commit. Lists available checkpoints if none provided.
/rollbackRestores codebase after failed multi-step /run or /evaluate using git stash/checkout/branch. Assesses scope for safest strategy and reports rollback details.
Share bugs, ideas, or general feedback.
Preparing to undo recent file modifications and restore to previous state.
git status --porcelain
git diff HEAD
Display what will happen:
FILE CHANGES TO REVERT:
M src/component.ts - 15 lines modified
M test/component.spec.ts - 8 lines modified
D public/old-file.json - deleted file will be restored
COMMITS TO UNDO: [if specified]
- Last commit: "feat: added new feature"
- Author: [user]
- Date: [date]
REQUIRES CONFIRMATION - This is destructive!
⚠️ DESTRUCTIVE OPERATION AHEAD
This will:
✗ Discard all uncommitted changes
✗ Optionally: Reset commits
✓ Preserve git history (can be viewed via git reflog)
Continue? (y/N)
Execute based on scope:
Option A: Discard uncommitted changes only
git restore .
# or for specific file:
git restore path/to/file
Option B: Revert last commit (keeps history)
git revert HEAD
Option C: Reset to previous commit (destructive)
git reset --hard HEAD~1
git status
git log --oneline -5
git diff
╔═════════════════════════════════╗
║ ROLLBACK COMPLETE ║
╚═════════════════════════════════╝
✓ Rolled back 2 files
✓ Restored from git history
✓ 23 lines of code removed
📊 Summary:
• src/component.ts - Restored to commit abc123f
• test/component.spec.ts - Restored to commit abc123f
🔄 To undo this rollback:
git reflog
git reset --hard [hash]
/rollback last - Discard last uncommitted changes/rollback HEAD~1 - Revert last commit/rollback path/to/file - Rollback specific file only/rollback list - Show what would be reverted without executing/rollback --confirm - Skip confirmation prompt (use cautiously)