---
title: "Reset worktree"
method: POST
path: "/experimental/worktree/reset"
---

# Reset worktree

`POST /experimental/worktree/reset`

Reset a worktree branch to the primary default branch.

## Query parameters

- `directory` string
- `workspace` string

## Request body

- WorktreeResetInput
  - `directory` string, required

## Response `200`

Worktree reset

- boolean

## Other responses

- `400` — Bad request

---

[API](https://skmtc.net/kaaass/apis/opencode.md) · [All operations](https://skmtc.net/kaaass/apis/opencode/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kaaass/opencode/versions/8bb9a15bd144/schema)
