512 B
512 B
Initialize parallel git worktree directories for parallel Claude Code agents
Variables
FEATURE_NAME: $ARGUMENTS NUMBER_OF_PARALLEL_WORKTREES: $ARGUMENTS
Execute these commands
Execute the loop in parallel with the Batch and Task tool
- create a new dir
trees/ - for i in NUMBER_OF_PARALLEL_WORKTREES
- RUN
git worktree add -b FEATURE_NAME-i ./trees/FEATURE_NAME-i - RUN
cd trees/FEATURE_NAME-i,git ls-filesto validate
- RUN
- RUN
git worktree listto verify all trees were created properly