Git Init
git_initInitialize Git repositories by creating the .git directory and setting up the initial branch structure. Configure new version control projects with support for bare repositories and custom default branch names.
Instructions
Initialize a new Git repository at the specified path. Creates a .git directory and sets up the initial branch.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "git_init"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Path to the Git repository. Defaults to session working directory set via git_set_working_dir. | . |
| initialBranch | No | Name of the initial branch (default: main). | |
| bare | No | Create a bare repository (no working directory). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| success | Yes | Indicates if the operation was successful. | |
| path | Yes | Path where repository was initialized. | |
| initialBranch | Yes | Name of the initial branch. | |
| isBare | Yes | Whether this is a bare repository. |