When you need to review a PR while keeping your feature work untouched, or run long tests on main while continuing development, worktrees let you check out multiple branches simultaneously in separate directories. Instead of stashing or cloning, you get parallel working directories that share the same Git database. The skill covers the essential commands (add, remove, list, prune) plus practical patterns like comparing implementations side by side, cherry-picking specific commits between worktrees, and maintaining a locked reference checkout of main. The one gotcha: each branch can only be checked out in one worktree at a time, so you can't accidentally work on the same branch in two places.

skills.sh installs
1.2K
GitHub stars
1.8K
last updated
Aug 21, 2026

Install

$ npx -y skills add neolabhq/context-engineering-kit --skill git-worktrees --agent claude-code

Installs into .claude/skills of the current project.

Files

Git Worktrees

Overview

Git worktrees enable checking out multiple branches simultaneously in separate directories, all sharing the same repository. Create a worktree instead of stashing changes or cloning separately.

Core principle: One worktree per active branch. Switch contexts by changing directories, not branches.

Core Concepts

ConceptDescription
Main worktreeOriginal working directory from git clone or git init
Linked worktreeAdditional directories created with git worktree add
Shared .gitAll worktrees share same Git object database (no duplication)
Branch lockEach branch can only be checked out in ONE worktree at a time
Worktree metadataAdministrative files in .git/worktrees/ tracking linked worktrees

Quick Reference

Sponsors

Details

Repository
github.com/neolabhq/context-engineering-kit
Categories
Testing & QA, Git & Pull Requests, Automation & Workflows
First seen
Jun 3, 2026

More from neolabhq/context-engineering-kit

All 63
1yoanbernabeu avatarsupabase-audit-rlsyoanbernabeu/supabase-pentest-skillsTest Row Level Security (RLS) policies for common bypass vulnerabilities and misconfigurations.1.2Kskills.sh installs
2ruvnet avatarswarm-advancedruvnet/rufloAdvanced swarm orchestration patterns for research, development, testing, and complex distributed workflows1.2Kskills.sh installs
3capawesome-team avatarcapacitor-plugin-developmentcapawesome-team/skillsGuides the agent through creating and maintaining Capacitor plugins from scratch. Covers scaffolding a new plugin project, designing the TypeScript API, impleme1.2Kskills.sh installs
4am-will avatargemini-computer-useam-will/codex-skillsBuild and run Gemini 2.5 Computer Use browser-control agents with Playwright. Use when a user wants to automate web browser tasks via the Gemini Computer Use mo1.2Kskills.sh installs
5juparave avatarflutter-riverpod-expertjuparave/dotfilesExpert knowledge in Flutter Riverpod state management (2025 best practices). Use when working with Riverpod, Flutter state management, AsyncNotifier, provider t1.2Kskills.sh installs
6capawesome-team avatarcapacitor-in-app-purchasescapawesome-team/skillsGuides the agent through setting up in-app purchases in Capacitor apps. Covers App Store Connect and Google Play Console product configuration, plugin selection1.1Kskills.sh installs