using-git-worktrees

Guide Git worktree creation and management across Codex and Claude environments.

8|4|Updated Jan 15, 2026
One-click install
npx skills add https://github.com/jscraik/Agent-Skills --skill using-git-worktrees-jscraik
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-git-worktrees
Source: https://github.com/jscraik/Agent-Skills/tree/main/utilities/using-git-worktrees
Command: npx skills add https://github.com/jscraik/Agent-Skills --skill using-git-worktrees-jscraik

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides clear, safe, and platform-aware guidance for setting up isolated Git worktrees, ensuring users understand the implications for branch management, synchronization, and cleanup across different development environments like Codex and Claude.

Core Features & Use Cases

  • Platform-Specific Guidance: Tailors instructions for Codex app threads and Claude CLI sessions.
  • Safe Synchronization: Explains the difference between 'Apply' and 'Overwrite' when syncing worktree changes back to a local checkout, preventing accidental data loss.
  • Branch Management: Warns about and guides users through the constraint that a single branch cannot be checked out in multiple worktrees simultaneously.
  • Cleanup Strategy: Recommends safe cleanup procedures for worktrees to avoid data loss.
  • Use Case: A developer needs to work on a new feature without disrupting their main branch. They can use this skill to create an isolated worktree, perform their work, and then safely sync their changes back, all while understanding the potential pitfalls.

Quick Start

Use the using-git-worktrees skill to start a new worktree for a feature branch in Codex.

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?

Git worktrees allow you to create isolated development branches within separate directories. This Skill guides you through setting up isolated worktrees to enable parallel workstreams without disrupting your main local checkout or branch.

What is the safe way to sync Git worktree changes back to a local checkout?

Safe branch synchronization requires understanding the difference between 'Apply' and 'Overwrite' when syncing worktree changes. This Skill explains how to apply changes safely to prevent accidental data loss during cross-platform workflow alignment.

Can I use Git worktrees with both Codex and Claude CLI environments?

Yes, Git worktrees work across Codex and Claude environments. This Skill provides platform-specific guidance for managing worktrees within Codex app threads and Claude CLI subagent isolation to ensure cross-platform workflow alignment.

Why does Git prevent a single branch from being checked out in multiple worktrees?

Git enforces this constraint to prevent conflicting changes and data corruption. This Skill warns about this branch management limitation and guides you through safe alternative strategies for isolated development.

What is the best cleanup strategy for Git worktrees to avoid data loss?

Proper Git worktree cleanup requires safe removal procedures to avoid losing uncommitted changes. This Skill recommends specific cleanup strategies to ensure worktree removal does not result in accidental data loss.