Skip to content

Recipe: Git Worktree — Parallel CI Debug / Hotfix

# Create worktree for CI debug branch
git worktree add .worktrees/debug-payment origin/feat/payment-refactor

# In the worktree: build/test
cd .worktrees/debug-payment && npm ci && npm test

# Clean up when done
git worktree remove .worktrees/debug-payment

# Hotfix against tag (independent of main)
git worktree add ../hotfix v2.1.3 -b hotfix/v2.1.4