git_diff
Show local code changes in a repository to review edits and plan next steps. Supports staged/unstaged diffs, path filtering, and unified context lines.
Instructions
git diff inside a project root (unstaged by default). Free local I/O — the review loop: ChatGPT reads this and decides next steps.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Restrict the diff to a path inside the root. | |
| cached | No | Diff staged (cached) changes instead of unstaged. | |
| context | No | Unified context lines (default 3). | |
| project | No | Project path the user named in chat (armed via init). Pass it explicitly on every call. If no project has been named, ask the user; never guess. | |
| session_token | No | Session token returned by init (or create_project). Required for every project tool call in this chat. A new chat must be re-armed. | |
| redact_secrets | No | Redact known secret patterns (default true). |