dmmulroy/.dotfiles/worktrees

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Manage Git worktrees in a canonical `.bare` repository root. Use when creating, reusing, listing, removing, or repairing worktrees, or when setting up a repository to keep all branch checkouts under one root.

Install

npx vskill@latest install dmmulroy/.dotfiles/worktrees

SKILL.md

Git worktrees

Use one root per repository:

text
<repo>/
.git # gitdir: ./.bare
.bare/ # shared repository and object store
main/ # linked worktree
<topic>/ # linked worktree

Run repository-wide commands from <repo> and development commands from a linked worktree. Keep every checkout under <repo>.

Create or reuse a worktree

  1. From any linked worktree or the canonical root, run `scripts/new-worktree.sh`:

``bash scripts/new-worktree.sh <local-dir> <branch> [base] ``

Set WORKTREE_ROOT only when root discovery is unavailable. Set WORKTREE_REMOTE when the remote is not origin.

  1. Enter <repo>/<local-dir> and run:

``bash git status --short --branch ``

Creation is complete when git worktree list contains the path and its expected branch, and status is clean unless the branch already carried changes.

The helper fetches and prunes, reuses an existing local branch, tracks a matching remote branch, or creates a new branch from [base]. Run it with --help for the exact decision order and defaults.

Remove a worktree

  1. Account for every staged, unstaged, and untracked change:

``bash git -C <repo>/<local-dir> status --short --branch ``

  1. Remove the checkout through Git:

``bash git -C <repo> worktree remove <local-dir> ``

  1. Delete the local branch only when its commits are integrated or intentionally discarded:

``bash git -C <repo> branch -d <branch> ``

Removal is complete when the path is absent from both the filesystem and git -C <repo> worktree list.

Setup and recovery

Read `references/canonical-root.md` when converting a repository to this layout, validating its invariants, cleaning stale registrations, or repairing moved worktrees.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
912
Repository forks
63
7-day trend score
34

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/dmmulroy/.dotfiles/worktrees/badge)](https://verified-skill.com/skills/dmmulroy/.dotfiles/worktrees)

Something wrong with this skill or its page? Tell us.