git_restore
Discard changes to specific files or unstage them, with confirmation and explicit paths to prevent accidental loss. Restores files to their last committed state.
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. |