Use Git worktrees for parallel development
I provide expertise in using Git worktrees to manage multiple branches simultaneously. I focus on improving productivity by allowing developers to work on separate tasks without stashing or switching branches in a single directory.
.git directory to access all branches across different worktrees.Adding a new worktree:
git worktree add ../hotfix-branch origin/main
This creates a new directory sibling to your current one, checks out origin/main, and sets it up as a separate worktree.
List all active worktrees:
git worktree list
Removing a worktree: When finished, delete the directory and run:
git worktree prune
Or use the direct command:
git worktree remove ../hotfix-branch
Common workflow:
git worktree add ../urgent-fix main.../urgent-fix.~/vaults/baphled/3. Resources/Knowledge Base/AI Development System/Skills/Git/Git Worktree.md
git-master: For general branch management and searchinggit-advanced: For history management and rebasing across branchesautomation: For setting up scripts that manage worktrees for CI/CD tasks