git_restore
Discard uncommitted changes to designated files or unstage them. Requires explicit confirmation and specific paths, preventing accidental loss of all work.
Instructions
Discard changes to specific files, or unstage them. This destroys uncommitted work, so it requires confirm=true and specific paths — it will never discard everything at once.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paths | Yes | Files to restore. Required. | |
| staged | No | Unstage instead of discarding worktree changes. Default false. | |
| confirm | Yes | Must be true — this discards uncommitted work. | |
| workspace | No | Workspace alias. Defaults to the active workspace. |