get_commit_diff
Compare code changes between commits, branches, or tags in GitHub repositories to analyze differences, review pull requests, or check version updates.
Instructions
Get the diff between two commits, branches, or tags in a GitHub repository.
USE THIS WHEN: You need to see what changed between two versions of code.
BEST FOR: Analyzing changes, reviewing pull requests (by comparing branches), or checking version differences.
Returns the raw git diff output.
Args:
repo: Repository in format "owner/repo" (e.g., "psf/requests")
base: Base commit SHA, branch name, or tag (e.g., "main", "v1.0.0", "a1b2c3d")
head: Head commit SHA, branch name, or tag (e.g., "feature-branch", "v1.1.0", "e5f6g7h")
Returns:
JSON with the raw git diff content.
Example: get_commit_diff("psf/requests", "v2.28.0", "v2.28.1") → Returns diff between versions
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | ||
| base | Yes | ||
| head | Yes |