v1
latestSwagger 2.02026-07-175445133.1 KBgit
Checkout a GitHub repository
Clones a GitHub repository as a bare repo and creates initial worktree
post/v1/git/checkout/{org}/{repo}
Path parameters
orgstring required
Organization name
repostring required
Repository name
Query parameters
branchstring
Branch name (optional)
Response
OK
Example response
{
"message": "Repository checked out successfully",
"repository": {
"available": true,
"created_at": "2024-01-15T10:30:00Z",
"default_branch": "main",
"description": "AI coding assistant",
"has_github_remote": true,
"id": "anthropics/claude-code",
"last_accessed": "2024-01-15T16:45:30Z",
"path": "/workspace/repos/anthropics_claude-code.git",
"remote_origin": "https://github.com/anthropics/claude-code.git",
"url": "https://github.com/anthropics/claude-code"
},
"worktree": {
"branch": "feature/api-docs",
"commit_count": 3,
"commit_hash": "abc123def456",
"commits_behind": 2,
"created_at": "2024-01-15T14:00:00Z",
"has_been_renamed": true,
"id": "abc123-def456-ghi789",
"is_dirty": true,
"last_accessed": "2024-01-15T16:30:00Z",
"name": "feature-api-docs",
"path": "/workspace/worktrees/feature-api-docs",
"pull_request_body": "This PR adds new functionality to the system",
"pull_request_state": "open",
"pull_request_title": "Feature: Add new functionality",
"pull_request_url": "https://github.com/owner/repo/pull/123",
"repo_id": "anthropics/claude-code",
"source_branch": "main",
"todos": [
{
"content": "Fix authentication bug",
"id": "1",
"priority": "high",
"status": "in_progress"
}
]
}
}