WorktreeRemove removes the worktree at the given path via `git worktree remove `.
(ctx context.Context, path string)
| 281 | // WorktreeRemove removes the worktree at the given path via |
| 282 | // `git worktree remove <path>`. |
| 283 | func (c *Client) WorktreeRemove(ctx context.Context, path string) error { |
| 284 | cmd, err := c.Command(ctx, "worktree", "remove", "--", path) |
| 285 | if err != nil { |
| 286 | return err |
| 287 | } |
| 288 | _, err = cmd.Output() |
| 289 | return err |
| 290 | } |
| 291 | |
| 292 | // WorktreePrune removes administrative files for worktrees that no longer |
| 293 | // exist on disk. |