git_add
Prepare modified or new files for a commit by staging them into the index. Use specific paths, all changes, or tracked updates for targeted staging.
Instructions
Stage files into the index, ready for committing. Use this to prepare modified or new files before a commit: select specific files, stage everything (all=True), or tracked changes only (update=True). Does NOT commit — use git_commit for that; review first with git_status and git_diff. Best for: preparing modified or new files before a commit. Returns: 'Staged files:' followed by the staged paths, or 'All changes staged'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | Stage all changes | |
| files | No | Paths to stage; must not start with '-' | |
| update | No | Stage modified and deleted files only | |
| repo_path | No | Path to the git repository, defaults to '.' (the server working directory) | . |