Parallel branch management with Git worktrees. Use when working on multiple features simultaneously.
git stash is lower frictionnode_modulesGit worktrees allow you to have multiple working directories from the same repository, each checked out to a different branch.
main-repo/ # Main working directory (main branch)
├── src/
├── tests/
└── ...
worktrees/
├── feature-a/ # Worktree for feature-a branch
└── feature-b/ # Worktree for feature-b branch
# Create new branch in new worktree
git worktree add ../my-feature -b feature/my-feature
# Create worktree from existing branch
git worktree add ../existing-feature feature/existing-feature
# Create worktree for a PR
git worktree add ../pr-123 pr/123
git worktree list
# Output:
# /path/to/main-repo abc1234 [main]
# /path/to/my-feature def5678 [feature/my-feature]
# /path/to/existing-feature ghi9012 [feature/existing-feature]
# Remove worktree after branch is merged
git worktree remove ../my-feature
# Force remove if untracked files
git worktree remove --force ../my-feature
# You're working on feature-A
cd ~/projects/my-app
# Urgent bug comes in - create worktree for hotfix
git worktree add ../my-app-hotfix -b hotfix/urgent-fix
# Switch to hotfix
cd ../my-app-hotfix
# Make fix, then commit using the finishing-a-development-branch skill
# (Do NOT run `git add` or `git commit` directly — use the skill)
git push origin hotfix/urgent-fix
# Return to feature work
cd ../my-app
# Clean up after hotfix merges
git worktree remove ../my-app-hotfix
# Create worktree to review PR
git worktree add ../pr-review pr/123
cd ../pr-review
# Run tests, review code
rtk bun test (or rtk npm test)
rtk bun run lint (or rtk npm run lint)
# Return to your work
cd ../my-app
# Clean up
git worktree remove ../pr-review
# Main repo: feature-a
cd ~/projects/my-app
# Working on feature A...
# Create worktree for feature-b
git worktree add ../my-app-feature-b -b feature/b
# Create another for spike
git worktree add ../my-app-spike -b spike/refactor-auth
# Can now switch between contexts instantly
cd ../my-app-feature-b # Work on feature B
cd ../my-app-spike # Work on spike
cd ../my-app # Back to feature A
project/
├── .git/ # Git directory
├── src/ # Main branch files
└── ...
# Worktrees (can be anywhere)
../project-feature-a/
├── .git # File pointing to main .git
├── src/ # Feature-a branch files
└── ...
../project-feature-b/
├── .git # File pointing to main .git
├── src/ # Feature-b branch files
└── ...
# Include project name and branch name
git worktree add ../myapp-feature-auth feature/auth
git worktree add ../myapp-hotfix-123 hotfix/issue-123
# If using Node.js, each worktree needs its own node_modules
cd ../myapp-feature-auth
rtk bun install (or rtk npm install)
# Or use workspaces for shared dependencies
# Each worktree can be opened in its own IDE window
code ../myapp-feature-auth
code ../myapp-feature-b
# Or use multi-root workspace
$ git worktree add ../feature feature/my-feature