Create Git Worktree Environment
Automate worktree creation with environment setup for parallel development workflows.
Quick Start
Execute the script with your branch name:
bash skills/creating-git-worktree/scripts/create-worktree.sh <branch-name>
Example:
bash skills/creating-git-worktree/scripts/create-worktree.sh feature/user-auth
# Creates: .git-worktrees/feature-user-auth
What the Script Does
- Sync with remote: Checkout and pull default branch
- Create worktree: In
.git-worktrees/<branch-name>(new or existing branch) - Copy environment files:
.env,.serenaif they exist - Reuse existing: Skip creation if worktree already exists
Branch Name Handling
/is converted to-for directory namesfeature/new-featurebecomes.git-worktrees/feature-new-feature
