Get a commit's diff
One step with GitLab. We can help you get access.
Look something up
Get a commit's diff
with GitLab
Works with AI assistants
Use GitLab: its GitLab REST Commits API lets you get a commit's diff in a single step (GET /api/v4/projects/{id}/repository/commits/{sha}/diff). GitLab also has an MCP server, so an AI assistant like Claude or ChatGPT can do it for you. capabilities.work can help you get signed up and connected.
- How do I see the file changes in a single commit?
- Can I get a commit's diff in unified diff format?
Say it to your AI assistant
- Show the diff of commit {sha} in project {id}.
- Get the unified diff for {sha} in {id}.
For your developer
GET /api/v4/projects/{id}/repository/commits/{sha}/diff in GitLab REST Commits API. Full spec on APIs.io.