---
title: "Create worktree preview"
method: POST
path: "/v1/git/worktrees/{id}/preview"
tags: ["git"]
---

# Create worktree preview

`POST /v1/git/worktrees/{id}/preview`

Creates a preview branch in the main repo for viewing changes outside container

## Path parameters

- `id` string, required

## Response `200`

OK

- InternalHandlersWorktreeOperationResponse — Response for worktree operations like delete, sync, merge, preview
  - `id` string — Worktree ID
  - `message` string — Operation result message
  - `strategy` string — Strategy used for sync operations

---

[API](https://skmtc.net/wandb/apis/catnip-container-api.md) · [All operations](https://skmtc.net/wandb/apis/catnip-container-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/wandb/catnip-container-api/versions/a075b0fa501a/schema)
