From fuse-commit-pro
Safely undoes the last Git commit: resets unpushed changes (--soft or --mixed) or reverts pushed ones after confirmation. Checks status, log, and remote before acting.
How this command is triggered — by the user, by Claude, or both
Slash command
/fuse-commit-pro:undo --soft | --mixed | (empty for soft reset)This command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
# Undo Last Commit ## Current State !`git status` ## Last Commit !`git log -1 --pretty=format:'%h %s'` ## Remote Status !`git log origin/HEAD..HEAD --oneline 2>/dev/null || echo "No remote tracking"` ## Instructions Safely undo the last commit while keeping changes. ### Security Check (MANDATORY) IF the last commit is already pushed to remote: - **REFUSE** to reset - Explain: "Cannot undo pushed commits with reset." - Suggest: `git revert HEAD` to create a reverting commit - Ask confirmation before executing revert IF the last commit is NOT pushed: 1. Ask confirmation: "Undo last...
!git status
!git log -1 --pretty=format:'%h %s'
!git log origin/HEAD..HEAD --oneline 2>/dev/null || echo "No remote tracking"
Safely undo the last commit while keeping changes.
IF the last commit is already pushed to remote:
git revert HEAD to create a reverting commitIF the last commit is NOT pushed:
--soft (default): Keep changes staged--mixed: Keep changes unstagedgit reset $ARGUMENTS HEAD~1git status| Flag | Effect |
|---|---|
--soft | Keep changes staged (default) |
--mixed | Keep changes unstaged |
npx claudepluginhub fusengine/agents --plugin fuse-commit-pro/undoSafely reverts GSD phase or plan commits using the phase manifest with dependency checks and a confirmation gate. Also supports --last, --phase, and --plan options.
/restore-changesRestores uncommitted git changes to last committed state for all or specific files, with confirmation and untracked file handling.
/undoSafely reverts last N, phase NN, or plan NN-MM commits using git revert. Preserves history, checks dependencies, and follows learnship workflow gates.