git_checkout
Switch between Git branches, restore files to specific versions, or create new branches to manage your code changes and repository state.
Instructions
Switch branches or restore files
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | Branch name, commit hash, or file path to checkout | |
| cwd | No | Repository directory | |
| createBranch | No | Create new branch | |
| force | No | Force checkout, discarding local changes |
Input Schema (JSON Schema)
{
"properties": {
"createBranch": {
"default": false,
"description": "Create new branch",
"type": "boolean"
},
"cwd": {
"description": "Repository directory",
"type": "string"
},
"force": {
"default": false,
"description": "Force checkout, discarding local changes",
"type": "boolean"
},
"target": {
"description": "Branch name, commit hash, or file path to checkout",
"type": "string"
}
},
"required": [
"target"
],
"type": "object"
}