git-worktrees

Worktrees live in a sibling directory named <project>_worktrees :

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "git-worktrees" with this command: npx skills add lexler/skill-factory/lexler-skill-factory-git-worktrees

Git Worktrees

Directory Convention

Worktrees live in a sibling directory named <project>_worktrees :

parent/ ├── myproject/ # main repo └── myproject_worktrees/ # worktrees directory ├── feature_1/ └── feature_2/

Branch Naming

Use <feature>_<N> pattern when creating multiple worktrees:

  • auth-refactor_1 , auth-refactor_2

  • api-migration_1 , api-migration_2

Workflow

  • Get project name from current directory

  • Create worktrees directory if needed: ../<project>_worktrees/

  • Create worktree with new branch: git worktree add <path> -b <branch>

Creating Multiple Worktrees

When asked for N worktrees for a feature:

PROJECT=$(basename "$PWD") WORKTREES_DIR="../${PROJECT}_worktrees" mkdir -p "$WORKTREES_DIR"

for i in $(seq 1 N); do git worktree add "${WORKTREES_DIR}/<feature>${i}" -b "<feature>${i}" done

Cleanup

Remove worktree and branch:

git worktree remove <path> git branch -d <branch>

List all worktrees: git worktree list

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

hexagonal-architecture

No summary provided by upstream source.

Repository SourceNeeds Review
General

using-uv

No summary provided by upstream source.

Repository SourceNeeds Review
General

nullables

No summary provided by upstream source.

Repository SourceNeeds Review
General

ai-patterns

No summary provided by upstream source.

Repository SourceNeeds Review