915 B
915 B
Create a new Git worktree with branch name and optional path: $ARGUMENTS
First, parse the arguments to extract:
- Branch name (required, first argument)
- Worktree path (optional, second argument - if not provided, use ../project-{branch-name})
Then execute these steps:
- Verify we're in a Git repository
- Show current worktrees with
git worktree list - Create the worktree using
git worktree add <path> -b <branch-name> - Navigate to the new worktree directory
- List directory contents and check for dependency files (package.json, requirements.txt, etc.)
- Install dependencies for each service:
- Run
npm ciin astro/ directory (frontend dependencies) - Run
npm ciin strapi/ directory (CMS dependencies) - Run
npm ciin tests/ directory (test dependencies)
- Run
- Provide instructions on how to start working in the new worktree If any errors occur, explain them and suggest solutions.