Checkout Git Branch
checkoutGitBranchSwitches the working tree to a Git branch using git switch, handling remote branches and creating new ones. Refuses when uncommitted changes would be overwritten; works only on development apps.
Instructions
Switch the working tree to a branch with git switch, so the name is never read as a path. A branch that exists only on the remote is checked out tracking it, and create makes a new branch at the current commit. Refuses when uncommitted changes would be overwritten; other uncommitted changes come along. Works only on a development app: any other app answers 403 read_only. Runs git in the app's running container and returns its output.
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": {
"workspaceSlug": "<workspaceSlug>",
"appSlug": "<appSlug>"
},
"name": "checkoutGitBranch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| env | No | ||
| region | No | ||
| appSlug | Yes | ||
| requestBody | No | The JSON request body. | |
| workspaceSlug | Yes |