Git Add
git_addStage files for commit by adding contents to the Git index. Select specific paths, stage all changes, or update only modified and deleted files before committing.
Instructions
Stage files for commit. Add file contents to the staging area (index) to prepare for the next commit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. | . |
| files | No | Array of file paths to stage (relative to repository root). Use ["."] to stage all changes. Can be omitted when all or update is true. | |
| update | No | Stage only modified and deleted files (skip untracked files). | |
| all | No | Include all items (varies by operation). | |
| force | No | Allow adding otherwise ignored files. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| success | Yes | Indicates if the operation was successful. | |
| stagedFiles | Yes | Files that were successfully staged. | |
| totalFiles | Yes | Total number of files staged. | |
| status | Yes | Repository status after staging files. |