---
title: "Initialize git repository"
method: POST
path: "/project/git/init"
---

# Initialize git repository

`POST /project/git/init`

Create a git repository for the current project and return the refreshed project info.

## Query parameters

- `directory` string
- `workspace` string

## Response `200`

Project information after git initialization

- Project
  - `id` string, required
  - `worktree` string, required
  - `vcs` 'git'
  - `name` string
  - `icon` object
    - `url` string
    - `override` string
    - `color` string
  - `commands` object
    - `start` string — Startup script to run when creating a new workspace (worktree)
  - `time` object, required
    - `created` number, required
    - `updated` number, required
    - `initialized` number
  - `sandboxes` string[], required

---

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