---
title: "List all worktrees"
method: GET
path: "/v1/git/worktrees"
tags: ["git"]
---

# List all worktrees

`GET /v1/git/worktrees`

Returns a list of all worktrees for the current repository with fast cache-enhanced responses

## Response `200`

OK

- InternalHandlersEnhancedWorktree[]
  - `branch` string — Current git branch name in this worktree
  - `cache_status` InternalHandlersWorktreeCacheStatus
    - `is_cached` boolean
    - `is_loading` boolean
    - `last_updated` integer — Unix timestamp in milliseconds
  - `commit_count` integer — Number of commits ahead of the divergence point (CommitHash)
  - `commit_hash` string — Commit hash where this worktree diverged from source branch (updated after merges)
  - `commits_behind` integer — Number of commits the source branch is ahead of our divergence point
  - `created_at` string — When this worktree was created
  - `has_active_claude_session` boolean — Whether there's an active Claude session for this worktree
  - `has_conflicts` boolean — Whether the worktree is in a conflicted state (rebase/merge conflicts)
  - `id` string — Unique identifier for this worktree
  - `is_dirty` boolean — Whether there are uncommitted changes in the worktree
  - `last_accessed` string — When this worktree was last accessed
  - `name` string — User-friendly name for this worktree (e.g., 'vectorize-quasar')
  - `path` string — Absolute path to the worktree directory
  - `pull_request_url` string — URL of the associated pull request (if one exists)
  - `repo_id` string — Repository this worktree belongs to
  - `session_title` GithubComVanpeltCatnipInternalModelsTitleEntry
    - `commit_hash` string
    - `timestamp` string
    - `title` string
  - `session_title_history` GithubComVanpeltCatnipInternalModelsTitleEntry[] — History of session titles
    - `commit_hash` string
    - `timestamp` string
    - `title` string
  - `source_branch` string — Branch this worktree was originally created from

## Changes

- **2025-07-18** `21270d5158bd` — 1 warning, 1 info
  - deleted the `header` request parameter `If-None-Match`
  - removed the non-success response with the status `304`

[Change history](https://skmtc.dev/wandb/apis/catnip-container-api/changes/v1/git/worktrees/get.md)

---

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