vcspull worktree prune¶
Remove worktrees that are no longer in your configuration.
Command¶
Usage¶
usage: vcspull worktree prune [-h] [-f FILE] [-w DIR] [--json] [--ndjson] [--color {auto,always,never}] [--dry-run] [pattern ...]
Positional Arguments¶
- repo_patterns pattern¶
patterns / terms of repos, accepts globs / fnmatch(3)
Options¶
- -f, --file FILE¶
path to config file (default: ~/.vcspull.yaml or ./.vcspull.yaml)
- -w, --workspace, --workspace-root DIR¶
filter by workspace root directory
- --json¶
output as JSON
- --ndjson¶
output as NDJSON (one JSON per line)
- --color¶
when to use colors (default: auto)
- --dry-run, -n¶
preview what would be pruned without making changes
Basic usage¶
Prune orphaned worktrees:
$ vcspull worktree prune '*'
Prune scans all git worktrees registered with each matched repository and
removes any that don’t appear in the current config. Repositories that have
had their worktrees config removed entirely are also scanned.
Dry run¶
Preview what would be removed:
$ vcspull worktree prune --dry-run '*'
Filtering¶
Prune worktrees for specific repositories:
$ vcspull worktree prune 'myproject'
JSON output¶
$ vcspull worktree prune --json '*'
NDJSON output¶
$ vcspull worktree prune --ndjson '*'