| name | git-worktree |
| description | Manage Git worktrees for concurrent local development. Creates worktrees at ~/.worktrees/REPO/BRANCH. Wrapper for the `wt` CLI. |
| license | Apache-2.0 |
Git Worktree
Manage worktrees for concurrent development without clobbering changes.
Setup
~/.claude/skills/git-worktree/scripts/wt.sh install
source ~/.zshrc
Usage
wt <branch>
wt <branch> --base ref
wt <branch> --no-editor
wt <branch> --open
wt <branch> --carry
wt <branch> --context f
wt cd <branch>
wt home
wt apply [branch]
wt apply --archive
wt apply --push
wt archive [branch]
wt archive --delete-branch
wt done
wt done --delete-branch
wt clean
wt clean --all
wt clean --dry-run
wt clean --delete-branch
wt list
wt list --all
wt ls
wt tree
wt status
wt open [branch]
wt install
Worktree Path Convention
Worktrees are created at ~/.worktrees/<repo>/<branch> where <repo> is the origin remote name (not the local directory name). This is derived from git remote get-url origin.
~/.claude (remote: dotclaude.git) → ~/.worktrees/dotclaude/<branch>
~/code/services (remote: services.git) → ~/.worktrees/services/<branch>
Environment
WORKTREES_ROOT=~/.worktrees
REPOS_ROOT=~/code
WT_TERMINAL=ghostty
Example
wt feature-auth
wt apply
Or archive from within the worktree when you're done:
wt feature-auth
wt done
wt done --delete-branch
Carrying Work in Progress
When you've been exploring and decide it should be its own branch:
wt feature-x --carry
Copies untracked files to the new worktree. Works from any branch.
conductor.json (Optional)
If your repo has a conductor.json, scripts run automatically:
{
"scripts": {
"setup": "cp $CONDUCTOR_ROOT_PATH/.env .env && bun install",
"archive": "git stash"
}
}
For Claude Code
When user asks to create a worktree, run:
wt <branch>
The script handles branch detection, env file copying, and setup automatically.
Suggest opening the worktree in their editor after creation.