git-worktree

Solid

Create isolated git worktrees for feature development without switching branches

AI & Automation 4,608 stars 615 forks Updated 2 days ago CC-BY-SA-4.0

Install

View on GitHub

Quality Score: 96/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Git Worktree Setup Create isolated git worktrees for feature development without switching branches. **Core principle:** Smart directory selection + symlink optimization + background verification = fast, reliable isolation. **Requires:** Git 2.5.0+ (July 2015) **Companion commands:** [`/git-worktree-status`](./git-worktree-status.md) | [`/git-worktree-remove`](./git-worktree-remove.md) | [`/git-worktree-clean`](./git-worktree-clean.md) ## Process 1. **Validate Branch Name**: Check naming convention and conflicts 2. **Check Existing Directories**: `.worktrees/` or `worktrees/` 3. **Verify .gitignore**: Ensure worktree dir is ignored 4. **Create Worktree**: `git worktree add` 5. **Symlink Dependencies**: Reuse `node_modules/` from main worktree 6. **Detect Database Provider**: Check for DB branching capability 7. **Install Dependencies**: Auto-detect package manager (if not symlinking) 8. **Run Background Verification**: Type check + tests in background 9. **Report Location**: Confirm ready with status ## Flags | Flag | Effect | |------|--------| | `--fast` | Skip dependency install and baseline tests | | `--isolated` | Fresh `node_modules` install (no symlink) | | `--skip-install` | Skip dependency install, keep baseline tests | ## Branch Name Validation ```bash # Auto-prefix based on naming convention # "auth" → "feat/auth" (default prefix) # "fix/login-bug" → kept as-is # "refactor/db-layer" → kept as-is # Accepted prefixes: feat/, fix/, refactor/, chore/, docs/...

Details

Author
FlorianBruniaux
Repository
FlorianBruniaux/claude-code-ultimate-guide
Created
4 months ago
Last Updated
2 days ago
Language
TypeScript
License
CC-BY-SA-4.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category