Using Git Worktree

Use git worktrees to develop multiple branches in parallel without stashing or context switching overhead. Use when handling concurrent features, hotfixes, and review tasks from the same repository.

nikopj01 Updated

File contents

Using Git Worktree

Workflow

  1. Create a dedicated worktree per task/branch.
  2. Keep dependency installs and build artifacts isolated per worktree as needed.
  3. Run tests in each worktree before commit and before push.
  4. Remove stale worktrees after merge to avoid confusion.
  5. Keep naming consistent so branch ownership and purpose stay clear.

nikopj01/codex-skills/tree/main/using-git-worktree commit 8531f1d60e

Frequently asked questions

npx skillmds@latest add nikopj01/using-git-worktree