using-git-worktrees

Create isolated git worktrees for feature development with directory-priority selection.

1|Updated Apr 17, 2026
One-click install
npx skills add https://github.com/ccakmak60/agentforge --skill using-git-worktrees-ccakmak60
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/ccakmak60/agentforge/tree/main/.trae/skills/using-git-worktrees
Command: npx skills add https://github.com/ccakmak60/agentforge --skill using-git-worktrees-ccakmak60

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Git worktrees let you create isolated workspaces that share a single repository, enabling parallel feature work without polluting the main tree.

Core Features & Use Cases

  • Directory-priority based worktree creation (prefers .worktrees, then worktrees, then global locations) with safety checks.
  • Automatic directory selection, project-name detection, and optional CLAUDE.md guidance to influence location.
  • Use cases include starting new feature development, experimenting on branches, and performing clean baselines before integration.

Quick Start

Create an isolated worktree for your feature using the preferred location and verify gitignore rules before proceeding.

Frequently Asked Questions about using-git-worktrees

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create isolated git worktrees for parallel feature development?

To create isolated git worktrees, the system scaffolds a new workspace sharing your main repository, applying a directory priority that prefers local `.worktrees` folders before falling back to global locations. This safely isolates feature branches without polluting the main tree.

What is the best way to manage git worktree directory selection across different projects?

Git worktree directory selection follows a defined priority, preferring `.worktrees`, then `worktrees`, and finally global locations. It auto-detects the project name and optionally reads `CLAUDE.md` preferences to guide the chosen workspace directory.

Does git worktree creation verify gitignore rules before starting feature development?

Yes, git worktree creation enforces safety through directory-ignore verification. It checks gitignore rules and performs basic project setup validation before allowing you to proceed with your feature development.

Can I use custom project configurations to guide git worktree location?

You can guide git worktree location by adding preferences to a `CLAUDE.md` file. The system respects these optional configurations while auto-detecting your project name and applying its standard directory priority logic.

When should I use a global location instead of a local directory for a git worktree?

Global locations for git worktrees are used when local project directories like `.worktrees` or `worktrees` are unavailable or unsuitable. The system falls back to global paths only after exhausting the preferred local directory options.