Remove Worktree banner
FlorianBruniaux FlorianBruniaux

Remove Worktree

Git community

Description

--- name: remove-worktree description: Remove a specific worktree cleanly (directory + git reference + branch) argument-hint: "<branch-name>" --- # Remove Worktree Remove a specific worktree properly, cleaning up directory, git references, and optionally the branch. ## Usage ```bash /tech:remove-worktree feature/auth /tech:remove-worktree fix/session-bug ``` ## Implementation Execute this script with branch name from `$ARGUMENTS`: ```bash #!/bin/bash set -euo pipefail BRANCH_NAME="$ARGUM

Installation

Installs to ~/.claude/commands/florianbruniaux-cc-sessions-remove-worktree.md

Terminal
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/FlorianBruniaux/cc-sessions/HEAD/.claude/commands/remove-worktree.md -o ~/.claude/commands/florianbruniaux-cc-sessions-remove-worktree.md

Restart Claude Code, or start a new session, for it to be picked up.

Full documentation available on GitHub

View Source Repository