Git Stash
git_stashSave uncommitted changes temporarily to switch branches, then restore via pop/apply, list existing stashes, or remove entries with drop/clear.
Instructions
Manage stashes: list stashes, save current changes (push), restore changes (pop/apply), or remove stashes (drop/clear).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. | . |
| mode | No | The stash operation to perform. Defaults to push (save current changes). | push |
| message | No | Stash message description (for push operation). | |
| stashRef | No | Stash reference like stash@{0} (for pop/apply/drop operations). | |
| includeUntracked | No | Include untracked files in the stash (for push operation). | |
| keepIndex | No | Don't revert staged changes (for push operation). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| success | Yes | Indicates if the operation was successful. | |
| mode | Yes | Operation mode that was performed. | |
| stashes | No | List of stashes (for list mode). | |
| created | No | Created stash reference (for push mode). | |
| applied | No | Applied stash reference (for pop/apply mode). | |
| dropped | No | Dropped stash reference (for drop mode). | |
| conflicts | No | Whether operation had conflicts. |