git-reset

Reset workspace to HEAD after confirming destructive git operations.

Updated Mar 19, 2026
One-click install
npx skills add https://github.com/LarryHsiao/Skadi --skill git-reset
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-reset
Source: https://github.com/LarryHsiao/Skadi/tree/main/skills/reset
Command: npx skills add https://github.com/LarryHsiao/Skadi --skill git-reset

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reset workspace to HEAD when the user asks to discard all changes.

Core Features & Use Cases

  • Prompts for explicit user confirmation before performing a destructive reset
  • Executes the commands to reset and clean the working tree after approval
  • Shows git status before and after the operation to provide clear visibility
  • Use case: recover from accidental commits, stashes, or untracked changes that should be discarded

Quick Start

Reset the workspace to HEAD after confirming the destructive action.

Frequently Asked Questions about git-reset

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely discard all local git changes and reset my workspace to HEAD?

To discard all local changes, the workflow requires explicit user confirmation before running git reset --hard HEAD and git clean -fd to clear staged, unstaged, and untracked files from your workspace.

What happens to untracked files when I reset my git workspace?

Untracked files are removed by executing git clean -fd during the workspace reset. The operation prompts for confirmation first to prevent accidental deletion of untracked changes before applying the destructive clean and reset commands.

Can I recover from accidental commits and stashes by doing a hard git reset?

Yes, a hard git reset to HEAD discards accidental commits and stashes by reverting your workspace. The process requires explicit confirmation before executing the destructive reset and clean commands to ensure intentional data loss.

Does a destructive git reset ask for confirmation before deleting workspace changes?

Yes, the destructive git reset requires explicit user confirmation before proceeding. It uses an interactive prompt to verify approval, aborts if denied, and displays git status before and after to provide clear visibility of changes.

Why does my git workspace still show changes after a hard reset to HEAD?

If untracked files remain after a hard reset, you must also run git clean -fd. The complete workspace reset executes both git reset --hard HEAD and git clean -fd together to ensure all staged, unstaged, and untracked changes are fully discarded.