git_checkout
Switch branches or restore working tree files in a local Git repository by specifying a branch, commit, or pathspec; optionally create and switch to a new branch.
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 |
|---|---|---|---|
| cwd | No | Optional local working directory or repository path. | |
| ref | Yes | Branch, commit, or pathspec argument. | |
| create | No | Create and switch to a new branch with git checkout -b. |