git-work

Manage branch-per-directory worktrees with a CLI wrapping git worktree.

3|Updated Feb 10, 2026
One-click install
npx skills add https://github.com/beeemT/git-work --skill git-work
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-work
Source: https://github.com/beeemT/git-work/tree/main
Command: npx skills add https://github.com/beeemT/git-work --skill git-work

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the friction and context loss of using git checkout when you want to work on multiple branches safely and independently at the same time.

Core Features & Use Cases

  • Branch-per-directory worktrees: creates one directory per branch so switching context is as simple as cding.
  • Fuzzy worktree navigation: resolves branch/worktree names using exact, substring, and Jaro-Winkler matching.
  • Safe sync and cleanup: fetches/prunes and removes stale worktrees while protecting the HEAD branch.
  • Shell wrapper integration: prints machine-readable paths on stdout so an interactive wrapper can automatically cd for you.

Quick Start

Convert an existing repo into a git-work layout by running: go to your repo directory and execute gw init.

Frequently Asked Questions about git-work

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

FAQPage Schema
How do I work on multiple git branches at the same time without losing context?

Use git worktree to create a separate directory for each branch, enabling simultaneous work on multiple branches without the context loss of git checkout. Each branch gets its own working directory for independent development.

What is the best way to manage multiple git worktrees for feature development?

Manage multiple git worktrees by using a CLI wrapper that maintains a shared bare repository and per-branch worktrees. This approach handles cloning, initialization, fuzzy navigation, creation, removal, and syncing of worktrees for active feature development.

Can I automatically switch directories when changing git branches?

Yes, you can automatically switch directories by using a shell wrapper that reads machine-readable paths from stdout. The wrapper changes the current directory for you when navigating between branch-per-directory worktrees.

How do I convert an existing git repository into a worktree layout?

Convert an existing repository by running an initialization command in your repo directory. This sets up a shared bare repository and configures the necessary per-branch worktree structure for branch-per-directory workflows.

Does fuzzy matching work for navigating git worktree branches?

Yes, fuzzy matching resolves branch and worktree names using exact, substring, and Jaro-Winkler matching. This allows quick navigation to the correct worktree directory without typing full branch names.

How do I safely clean up stale git worktrees and protect the HEAD branch?

Safely clean up stale worktrees by running a sync operation that fetches, prunes, and removes stale worktrees while protecting the HEAD branch from accidental deletion during maintenance.