← All procedures
git.branch.delete
Delete a branch. With force, also a branch that is not merged
CLI- Package
- @procedures/git · README
- Path
["git","branch","delete"]- CLI
mark git branch delete --name <string>- As data
{"$proc":["git","branch","delete"],"input":{}}
Use it
In TypeScript
import { Client, LocalTransport, PROCEDURE_REGISTRY } from "@procedures/client";
import "@procedures/git/register"; // registers its procedures
const client = new Client(new LocalTransport({ registry: PROCEDURE_REGISTRY }));
const result = await client.exec(["git","branch","delete"], { name: "<name>" });
console.log(JSON.stringify(result));From the command line
$ mark git branch delete --name <string>
As data, in a program
{ "$proc": ["git", "branch", "delete"], "input": { "name": "<name>" } }Input
Output
JSON Schemas
{
"input": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The branch name"
},
"force": {
"description": "Delete it also when it is not merged. Its commits can be lost (default: false)",
"type": "boolean"
},
"cwd": {
"description": "Working directory",
"type": "string"
}
},
"required": [
"name"
]
},
"output": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The branch name"
},
"hash": {
"type": "string",
"description": "The last commit of the deleted branch"
}
},
"required": [
"name",
"hash"
],
"additionalProperties": {}
}
}