---
title: "Sync worktree with source branch"
method: POST
path: "/v1/git/worktrees/{id}/sync"
tags: ["git"]
---

# Sync worktree with source branch

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

Syncs a worktree with its source branch using merge or rebase strategy

## Path parameters

- `id` string, required

## Request body

- object

## 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)
