Git worktrees for parallel branches
Instead of stashing to switch branches, check a branch out into a separate working directory:
# create a new worktree for an existing branch
git worktree add ../myrepo-hotfix hotfix
# ...or a brand-new branch
git worktree add -b feature/x ../myrepo-x
# list and clean up
git worktree list
git worktree remove ../myrepo-hotfix
Each worktree shares the same .git, so it’s cheap — no re-clone.