Skip to main content
Glama

mcp-git

by ver0-project

checkout

Switch branches or commits, create new branches, or restore specific files in a Git repository. Manage repository states with options for force checkout, branch creation, and tracking configurations.

Instructions

Switch branches, commits, or restore working tree files.

Input Schema

NameRequiredDescriptionDefault
createBranchNoCreate a new branch and start it at <start-point> (-b <new-branch>)
createBranchForceNoCreate or reset a branch and start it at <start-point> (-B <new-branch>)
detachNoCheck out a commit for inspection rather than switching to a branch (--detach)
forceNoForce checkout, throw away local modifications (-f, --force)
mergeNoWhen switching branches, proceed even if index/working tree differs from HEAD (-m, --merge)
noTrackNoDo not set up upstream configuration (--no-track)
orphanNoCreate a new orphan branch (--orphan <new-branch>)
pathspecNoLimit checkout to specific paths
repoPathYesAbsolute path to the git repository
targetYesBranch name, commit hash, or tag to checkout
trackNoSet up upstream configuration (--track)

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "createBranch": { "description": "Create a new branch and start it at <start-point> (-b <new-branch>)", "type": "string" }, "createBranchForce": { "description": "Create or reset a branch and start it at <start-point> (-B <new-branch>)", "type": "string" }, "detach": { "description": "Check out a commit for inspection rather than switching to a branch (--detach)", "type": "boolean" }, "force": { "description": "Force checkout, throw away local modifications (-f, --force)", "type": "boolean" }, "merge": { "description": "When switching branches, proceed even if index/working tree differs from HEAD (-m, --merge)", "type": "boolean" }, "noTrack": { "description": "Do not set up upstream configuration (--no-track)", "type": "boolean" }, "orphan": { "description": "Create a new orphan branch (--orphan <new-branch>)", "type": "string" }, "pathspec": { "description": "Limit checkout to specific paths", "items": { "type": "string" }, "type": "array" }, "repoPath": { "description": "Absolute path to the git repository", "type": "string" }, "target": { "description": "Branch name, commit hash, or tag to checkout", "type": "string" }, "track": { "description": "Set up upstream configuration (--track)", "type": "boolean" } }, "required": [ "repoPath", "target" ], "type": "object" }

You must to connect to the server.

Other Tools from mcp-git

Related Tools

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ver0-project/mcps'

If you have feedback or need assistance with the MCP directory API, please join our Discord server