git_checkout
Switch branches or restore working tree files in a Git repository, optionally creating a new branch first. Use it to move between refs or recover files from a specific commit.
Instructions
Switch branches or restore working tree files
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"ref": "<ref>"
},
"name": "git_checkout"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | Yes | The branch name, tag, or commit to checkout | |
| repoPath | No | Path to git repository (defaults to current directory) | |
| createBranch | No | Create a new branch before checking out |