← All procedures

git.worktree.remove

Remove a working tree and its folder

CLI
Package
@procedures/git · README
Path
["git","worktree","remove"]
CLI
mark git worktree remove --path <string>
As data
{"$proc":["git","worktree","remove"],"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","worktree","remove"], { path: "<path>" });
console.log(JSON.stringify(result));

From the command line

$ mark git worktree remove --path <string>

As data, in a program

{
  "$proc": ["git", "worktree", "remove"],
  "input": { "path": "<path>" }
}

Input

FieldTypeRequiredDefaultDescription
pathstringyesThe folder of the working tree
forcebooleannoRemove it also with changes that are not committed. They are lost (default: false)
cwdstringnoWorking directory

Output

FieldTypeRequiredDefaultDescription
pathstringyesThe path of the removed working tree
JSON Schemas
{
  "input": {
    "type": "object",
    "properties": {
      "path": {
        "type": "string",
        "description": "The folder of the working tree"
      },
      "force": {
        "description": "Remove it also with changes that are not committed. They are lost (default: false)",
        "type": "boolean"
      },
      "cwd": {
        "description": "Working directory",
        "type": "string"
      }
    },
    "required": [
      "path"
    ]
  },
  "output": {
    "type": "object",
    "properties": {
      "path": {
        "type": "string",
        "description": "The path of the removed working tree"
      }
    },
    "required": [
      "path"
    ],
    "additionalProperties": {}
  }
}