git-reset
Reset Git repository state to undo changes, move HEAD to specific commits, or restore branches using soft, mixed, or hard reset operations with safety controls for destructive actions.
Instructions
Git reset tool for repository state management. Supports soft, mixed, hard reset capabilities and reset-to-commit and reset-branch functionality. Includes safety warnings for destructive operations like hard reset.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
action | Yes | The reset operation to perform | |
branch | No | Branch name (required for reset-branch operation) | |
commit | No | Commit hash or reference (required for reset-to-commit, optional for others) | |
confirmDestructive | No | Explicit confirmation for destructive operations (required for hard reset) | |
files | No | Specific files to reset (for mixed/soft resets) | |
force | No | Force reset - required for hard reset operations | |
projectPath | Yes | Absolute path to the project directory | |
quiet | No | Suppress output during reset operation | |
skipWarning | No | Skip safety warnings (use with extreme caution - not recommended) |
Input Schema (JSON Schema)
{
"properties": {
"action": {
"description": "The reset operation to perform",
"enum": [
"soft",
"mixed",
"hard",
"reset-to-commit",
"reset-branch"
],
"type": "string"
},
"branch": {
"description": "Branch name (required for reset-branch operation)",
"type": "string"
},
"commit": {
"description": "Commit hash or reference (required for reset-to-commit, optional for others)",
"type": "string"
},
"confirmDestructive": {
"description": "Explicit confirmation for destructive operations (required for hard reset)",
"type": "boolean"
},
"files": {
"description": "Specific files to reset (for mixed/soft resets)",
"items": {
"type": "string"
},
"type": "array"
},
"force": {
"description": "Force reset - required for hard reset operations",
"type": "boolean"
},
"projectPath": {
"description": "Absolute path to the project directory",
"type": "string"
},
"quiet": {
"description": "Suppress output during reset operation",
"type": "boolean"
},
"skipWarning": {
"description": "Skip safety warnings (use with extreme caution - not recommended)",
"type": "boolean"
}
},
"required": [
"action",
"projectPath"
],
"type": "object"
}