v1
latestSwagger 2.02026-07-175445133.1 KBgit
Get worktree diff
Returns the diff for a worktree against its source branch, including all staged/unstaged changes
get/v1/git/worktrees/{id}/diff
Path parameters
idstring required
Worktree ID
Response
OK
Example response
{
"additions": 25,
"deletions": 10,
"diff": "diff --git a/main.go b/main.go...",
"files_changed": [
"[\"main.go\"",
" \"README.md\"]"
],
"summary": "2 files changed, 25 insertions(+), 10 deletions(-)"
}