Skip to main content

Documentation 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.

DP Code surfaces Git operations directly inside every thread, so you can review changes, manage branches, and ship pull requests without switching to a separate terminal or GUI tool. Git actions are available in the thread’s toolbar and context panel and work on the thread’s active working directory — whether that is your main workspace root or a dedicated worktree.

Git status

DP Code shows a live Git status for each thread, including:
  • The active branch name
  • Whether the working tree has uncommitted changes, and a file-level breakdown of insertions and deletions
  • Whether the branch has an upstream remote, and how many commits it is ahead or behind
  • The open pull request associated with the current branch, if any
The status view has two parts that update independently: local working tree changes refresh immediately, and the remote (ahead/behind, PR) check runs in the background.

Branch management

You can perform the following branch operations from inside a thread:
OperationDescription
List branchesSee all local and remote branches for the project, with a flag indicating which is current and whether any branch has a linked worktree.
Create branchCreate a new branch from the current HEAD. Optionally publish it to the remote immediately.
CheckoutSwitch the working directory to a different branch.
Stash and checkoutStash uncommitted changes and check out a different branch in one step.
PullPull the latest changes from the upstream remote for the current branch.

Worktree management

Worktrees let you check out multiple branches of the same repository simultaneously. DP Code creates and manages worktrees automatically when you use worktree thread mode, and you can also create them manually.
OperationDescription
Create worktreeCheck out an existing or new branch into a new worktree directory.
Create detached worktreeCheck out a specific Git ref (commit SHA, tag) into a detached worktree without creating a branch.
Remove worktreeDelete a worktree directory and deregister it from Git. Pass force: true to remove even if the worktree has uncommitted changes.
Removing a worktree with force permanently discards uncommitted changes in that worktree. Make sure you have committed or stashed any work you want to keep before removing.

Diff viewer

DP Code includes a built-in diff viewer that lets you inspect exactly what changed and when.
Shows all changes currently in the working tree — staged, unstaged, or combined — for the thread’s active directory. Use the scope selector to switch between workingTree, unstaged, staged, and branch views.

Stash operations

OperationDescription
Stash infoRead the current stash entry — branch, stash ref, message, and list of stashed files.
Stash and checkoutStash the working tree and switch branches atomically.
Stash dropDiscard the stash entry for the working directory.

Stacked PR workflow

DP Code can run a multi-step Git action sequence in a single command. The gitRunStackedAction operation chains any combination of the following phases:
1

commit

Stages and commits changes with an AI-generated or user-supplied commit message. Skipped automatically if there are no changes.
2

push

Pushes the branch to the remote. Sets up tracking if the upstream branch does not exist yet.
3

create_pr

Opens a pull request using the GitHub CLI, targeting the repository’s default branch unless overridden.
Shortcut actions combine multiple phases: commit_push runs commit and push together; commit_push_pr runs all three in sequence. Progress events stream in real time as each phase starts and finishes, including any pre-commit or pre-push hook output.

Pull request integration

When a thread has an associated pull request, DP Code surfaces it in the thread header. From the PR panel you can:
  • Resolve a PR: look up a PR by number or URL and inspect its branch and base information.
  • Prepare a PR thread: resolve a PR and configure a new thread that checks out the PR’s branch (local or worktree mode), ready to continue work on it with an AI agent.

Git handoff between threads

When you switch a thread between local and worktree environment modes, DP Code performs a Git handoff: it transfers the current working tree state to the new environment, resolving branch and worktree references automatically. The handoff result tells you whether changes were transferred cleanly and whether any conflicts were detected.

Build docs developers (and LLMs) love