v1

latestSwagger 2.02026-07-175445133.1 KB
git

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

additionsinteger

Number of lines added

deletionsinteger

Number of lines deleted

diffstring

Raw git diff output

files_changedstring[]

List of changed files

summarystring

Diff summary

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(-)"
}