Manages parallel development environments using git worktrees. Ideal for operations teams to streamline workflows. Connects to git repositories and integrates with Claude agents.
git clone https://github.com/Wirasm/worktree-manager-skill.gitManages parallel development environments using git worktrees. Ideal for operations teams to streamline workflows. Connects to git repositories and integrates with Claude agents.
[{"step":"Identify the branches you need to work on in parallel. For example, one branch for a new feature and another for a critical bug fix.","action":"Replace [FEATURE_BRANCH] and [BUG_FIX_BRANCH] in the prompt with your actual branch names. Specify the paths where the worktrees should be created using [WORKTREE_PATH] and [REPO_PATH].","tip":"Use descriptive branch names to avoid confusion. For example, `feature/user-authentication` instead of `feature-123`."},{"step":"Run the generated commands in your terminal to set up the worktrees.","action":"Copy the commands from the AI’s output and paste them into your terminal. Ensure you have the latest changes from the remote repository by running `git fetch origin` first.","tip":"Double-check the paths to avoid overwriting existing directories. Use absolute paths for clarity."},{"step":"Switch between worktrees as needed using `cd` or your IDE’s file explorer.","action":"Navigate to the worktree directory you want to work on, e.g., `cd ~/dev/project/worktrees/feature-branch`.","tip":"Use `git worktree list` to see all active worktrees and their statuses. This helps you keep track of your environments."},{"step":"Commit changes and push updates from the relevant worktree.","action":"After making changes in a worktree, commit and push them to the corresponding branch. For example:\n```bash\ncd ~/dev/project/worktrees/feature-branch\ngit add .\ngit commit -m \"Implement user authentication\"\ngit push origin feature/user-authentication\n```","tip":"Always pull the latest changes from the remote branch before starting work to avoid conflicts."},{"step":"Clean up worktrees when they’re no longer needed.","action":"Use `git worktree remove <path>` to delete a worktree once the branch is merged or no longer required. For example:\n```bash\ngit worktree remove ~/dev/project/worktrees/feature-branch\n```","tip":"Remove worktrees only after ensuring all changes are pushed and merged to avoid losing work."}]
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/Wirasm/worktree-manager-skillCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Set up a git worktree-based development environment for [PROJECT_NAME] to handle [FEATURE_BRANCH] and [BUG_FIX_BRANCH] simultaneously. Initialize the worktree in [WORKTREE_PATH] linked to the main repository at [REPO_PATH]. Ensure the worktree is clean and up-to-date with the latest changes from [REMOTE_BRANCH]. Provide the commands to switch between worktrees and list all active worktrees for reference.
Here’s a step-by-step setup for managing parallel development environments for the `ecommerce-platform` project using git worktrees. We’ll create two worktrees: one for the `feature/checkout-redesign` branch and another for the `bugfix/payment-gateway` branch. Both will be initialized in the `~/dev/ecommerce-platform/worktrees/` directory, linked to the main repository at `~/dev/ecommerce-platform/main-repo/`.
1. **Initialize the main repository and fetch the latest changes:**
```bash
cd ~/dev/ecommerce-platform/main-repo
git fetch origin
git checkout main
git pull origin main
```
2. **Create the first worktree for the feature branch (`feature/checkout-redesign`):**
```bash
git worktree add ~/dev/ecommerce-platform/worktrees/checkout-redesign origin/feature/checkout-redesign
```
3. **Create the second worktree for the bugfix branch (`bugfix/payment-gateway`):**
```bash
git worktree add ~/dev/ecommerce-platform/worktrees/payment-gateway origin/bugfix/payment-gateway
```
4. **Verify the worktrees are active and clean:**
```bash
git worktree list
```
Output:
```
/home/user/dev/ecommerce-platform/main-repo 9a3b2c1 [main]
/home/user/dev/ecommerce-platform/worktrees/checkout-redesign 4d5e6f2 [feature/checkout-redesign]
/home/user/dev/ecommerce-platform/worktrees/payment-gateway 7g8h9i0 [bugfix/payment-gateway]
```
5. **Switch between worktrees:**
- To work on the feature branch:
```bash
cd ~/dev/ecommerce-platform/worktrees/checkout-redesign
```
- To work on the bugfix branch:
```bash
cd ~/dev/ecommerce-platform/worktrees/payment-gateway
```
6. **Clean up (if needed):**
To remove a worktree (e.g., `payment-gateway`):
```bash
git worktree remove ~/dev/ecommerce-platform/worktrees/payment-gateway
```
This setup ensures that you can work on multiple branches in isolated environments without cluttering your main repository or dealing with merge conflicts prematurely. Each worktree operates independently, allowing you to focus on specific tasks without interference.AI assistant built for thoughtful, nuanced conversation
Free Accounting Software
IronCalc is a spreadsheet engine and ecosystem
Customer feedback management made simple
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan