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
Name | Required | Description | Default |
---|---|---|---|
createBranch | No | Create a new branch and start it at <start-point> (-b <new-branch>) | |
createBranchForce | No | Create or reset a branch and start it at <start-point> (-B <new-branch>) | |
detach | No | Check out a commit for inspection rather than switching to a branch (--detach) | |
force | No | Force checkout, throw away local modifications (-f, --force) | |
merge | No | When switching branches, proceed even if index/working tree differs from HEAD (-m, --merge) | |
noTrack | No | Do not set up upstream configuration (--no-track) | |
orphan | No | Create a new orphan branch (--orphan <new-branch>) | |
pathspec | No | Limit checkout to specific paths | |
repoPath | Yes | Absolute path to the git repository | |
target | Yes | Branch name, commit hash, or tag to checkout | |
track | No | Set up upstream configuration (--track) |