create-branch
Initiate and manage a new git branch from a specified repository, with options to define a starting point, switch to the branch, or force creation if it exists.
Instructions
Create a new git branch, optionally from a specific starting point.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
branchName | Yes | Name of the new branch to create | |
force | No | Force create branch, resetting it if it already exists (-B flag) | |
repoPath | Yes | Absolute path to the git repository | |
startPoint | No | Starting point for new branch (commit, branch, or tag). Defaults to current HEAD | |
switchToBranch | No | Switch to the new branch after creation (default: true) |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"branchName": {
"description": "Name of the new branch to create",
"type": "string"
},
"force": {
"description": "Force create branch, resetting it if it already exists (-B flag)",
"type": "boolean"
},
"repoPath": {
"description": "Absolute path to the git repository",
"type": "string"
},
"startPoint": {
"description": "Starting point for new branch (commit, branch, or tag). Defaults to current HEAD",
"type": "string"
},
"switchToBranch": {
"default": true,
"description": "Switch to the new branch after creation (default: true)",
"type": "boolean"
}
},
"required": [
"repoPath",
"branchName"
],
"type": "object"
}