Loading...
Loading...
Remove git worktrees from .worktrees/ directory and clean up all traces. Use this when the user wants to delete a worktree they no longer need, with interactive selection if no worktree name is provided.
npx skill4agent add alex-popov-tech/.dotfiles git-worktree-remove.worktrees/scripts/remove_worktree.sh/-git-worktree-create.worktrees/git worktree remove --force.worktrees/scripts/remove_worktree.sh <worktree-name># Remove worktree by directory name
scripts/remove_worktree.sh hotfix-123
# Remove worktree using original branch name (will be auto-sanitized)
scripts/remove_worktree.sh user.name/AOF-123
# This will remove: .worktrees/user.name-AOF-123
# Both approaches work the same:
scripts/remove_worktree.sh feature/new-feature
scripts/remove_worktree.sh feature-new-featurescripts/remove_worktree.shNo worktree name provided. Available worktrees:
[1] feature-branch
[2] hotfix-123
[3] bugfix-456
Select worktree to remove (number or name):2hotfix-123--force.worktrees/<worktree-name>.worktrees/.worktrees/# User has finished work on hotfix-123 worktree
$ scripts/remove_worktree.sh hotfix-123
⚠️ About to remove worktree: .worktrees/hotfix-123
Are you sure? (y/N): y
Removing worktree...
✅ Worktree removed successfully
Pruning worktree administrative data...
✅ Worktree 'hotfix-123' has been completely removed
All traces of the worktree have been cleaned up.