Add Git hook and management scripts for automatic worktree creation when branching from main. ## Features **Automatic Worktree Creation:** - Post-checkout Git hook automatically creates worktrees for new branches - Creates worktrees at `../repo-name-branch-name` - Only activates when branching from main/master - Smart detection to avoid duplicate worktrees **Worktree Manager Script:** - `list` - List all worktrees with branches - `create <branch>` - Manually create worktree - `remove <branch>` - Remove worktree - `clean` - Remove all worktrees except main - `goto <branch>` - Get path to worktree (for cd) - `status` - Show git status of all worktrees ## Benefits - Work on multiple branches simultaneously - No need to stash when switching branches - Run dev servers on different branches in parallel - Compare code across branches easily - Keep main branch clean ## Files Added - `.git/hooks/post-checkout` - Auto-creates worktrees on branch creation - `scripts/worktree-manager.sh` - Manual worktree management CLI - `WORKTREE_SETUP.md` - Complete documentation and usage guide ## Usage **Automatic (when branching from main):** ```bash git checkout -b feature/new-feature # Worktree automatically created at ../canvas-website-feature-new-feature ``` **Manual:** ```bash ./scripts/worktree-manager.sh create feature/my-feature ./scripts/worktree-manager.sh list cd $(./scripts/worktree-manager.sh goto feature/my-feature) ``` See WORKTREE_SETUP.md for complete documentation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| worktree-manager.sh | ||