#!/bin/bash # Set up the structure to use worktrees in this clone. BRANCHES=("core") for BRANCH in "${BRANCHES[@]"; do mkdir -p "$BRANCH" git worktree add "./$BRANCH" "origin/$BRANCH" done