The git methods expose a full set of repository operations over the WebSocket API. All methods use theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Emanuele-web04/dpcode/llms.txt
Use this file to discover all available pages before exploring further.
git.* namespace and follow the same request/response format. Most git methods require a cwd field that identifies the repository to operate on.
git.status
Retrieve the current status of a git repository, including the working tree, upstream tracking, and associated pull request.Parameters
Absolute path to the repository working directory.
Response
Current branch name, or
null if the repository is in detached HEAD state.Whether there are uncommitted changes.
Whether the current branch has a remote tracking branch.
Name of the remote tracking branch, e.g.
"origin/main".Number of local commits not yet pushed to upstream.
Number of upstream commits not yet pulled locally.
Associated pull request, if any.
git.readWorkingTreeDiff
Read the raw unified diff for the current working tree.Parameters
Absolute path to the repository.
Which diff to read. One of:
"workingTree" (all unstaged + staged), "unstaged", "staged", "branch".Response
Unified diff string.
git.summarizeDiff
Generate a natural-language summary of a diff patch using an AI text-generation model.Parameters
The unified diff patch to summarize.
Model to use for summarization.
Optional override for the Codex home path.
Optional per-provider start options.
Response
AI-generated summary of the diff.
git.pull
Pull the latest changes from the remote tracking branch.Parameters
Response
Whether a pull was performed or the branch was already up to date.
Current branch name after the pull.
Remote tracking branch, if any.
git.listBranches
List all local and remote branches in a repository.Parameters
Response
Whether the directory is inside a git repository.
Whether an
origin remote is configured.git.createBranch
Create a new branch, optionally publishing it to the remote.Parameters
Name of the branch to create.
If
true, push the new branch to the remote immediately.Response
Returns void on success.git.checkout
Checkout an existing branch.Parameters
Branch name to checkout.
Response
Returns void on success.git.stashAndCheckout
Stash any working-tree changes and then checkout a different branch.Parameters
Branch name to checkout after stashing.
Response
Returns void on success.git.stashDrop
Drop the most recent stash entry.Parameters
Response
Returns void on success.git.stashInfo
Retrieve information about the most recent stash entry.Parameters
Response
Branch the stash was created from.
Stash reference, e.g.
"stash@{0}".Stash message.
List of file paths included in the stash.
git.createWorktree
Create a linked worktree for an existing branch.Parameters
Branch to check out in the new worktree.
If provided, create a new branch with this name in the worktree.
Path where the worktree should be created, or
null for an auto-generated path.Response
git.createDetachedWorktree
Create a linked worktree in detached HEAD state at a specific ref.Parameters
Commit SHA, tag, or other git ref to checkout.
Destination path, or
null for auto-generated.Response
git.removeWorktree
Remove a linked worktree.Parameters
Absolute path of the worktree to remove.
Force removal even if the worktree has uncommitted changes.
Response
Returns void on success.git.runStackedAction
Streaming. Run a stacked git action (commit, push, create PR, or combinations). Progress events are streamed as the action proceeds through phases. The server also pushes events on thegit.actionProgress channel.
Parameters
Unique identifier for this action. Used to correlate progress events.
One of:
"commit", "push", "create_pr", "commit_push", "commit_push_pr".Commit message. Max 10,000 characters. Required when the action includes a commit step.
Whether to create a feature branch for the commit.
Specific file paths to stage. If omitted, all changes are staged.
Model to use if AI-assisted commit message generation is triggered.
Optional Codex home path override.
Optional per-provider start options.
Stream items (GitActionProgressEvent)
Each streamed item has a kind field:
kind | Additional fields |
|---|---|
action_started | phases: string[] — list of phases that will run |
phase_started | phase, label |
hook_started | hookName |
hook_output | hookName, stream: "stdout" | "stderr", text |
hook_finished | hookName, exitCode, durationMs |
action_finished | result — final GitRunStackedActionResult |
action_failed | phase, message |
actionId, cwd, and action.
Final result (action_finished)
git.resolvePullRequest
Resolve a pull request reference (number, URL, or branch name) to full PR metadata.Parameters
PR number (e.g.
"42"), URL, or branch name.Response
git.preparePullRequestThread
Resolve a pull request and prepare the branch or worktree needed to work on it, returning the resolved PR, the branch name, and the worktree path if applicable.Parameters
PR reference (number, URL, or branch name).
Whether to check out locally or in a linked worktree.
Response
Resolved PR (same structure as
git.resolvePullRequest).Branch name to use for the thread.
Worktree path if
mode is "worktree", otherwise null.git.removeIndexLock
Remove a stale.git/index.lock file. Use this to recover when git commands fail because a lock file was left behind.
Parameters
Response
Returns void on success.git.init
Initialize a new git repository in a directory.Parameters
Directory to initialize as a git repository.
Response
Returns void on success.git.handoffThread
Prepare a thread handoff by resolving the target environment (local branch or worktree) and transferring any uncommitted changes.Parameters
Response
Whether uncommitted changes were successfully transferred.
Whether merge conflicts were detected during transfer.
Human-readable status message.
Complete example: status then commit/push
- 1. Check status
- 2. Run commit + push
- Progress events