git_get_diff
Get a diff between two git refs or commits to compare branches, inspect commit ranges, or review changes. Supports paging through large diffs with offset.
Instructions
Get a diff between two git refs or commits. Use when you need to compare a feature branch to main, inspect a specific commit range, or review changes between two refs. For large diffs, increase maxChars or use charOffset to page through them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repoPath | No | Path to the git repository (defaults to cwd) | |
| fromRef | No | Base ref or commit | |
| toRef | No | Target ref or commit (requires fromRef) | |
| maxChars | No | Max characters to return (default 8000). Increase for large diffs. | |
| charOffset | No | Skip this many characters from the start (for paging large diffs) |