Git Worktree
Work on multiple branches simultaneously — no stashing, no context switching.
The Situation
You're working on a new dashboard feature. You have uncommitted changes in dashboard.tsx and routes.ts. Suddenly, your teammate pings you: there's a critical bug on main that needs an urgent fix. What do you do?
terminal
$ git status
On branch feature-branch
Changes not staged for commit:
modified: src/dashboard.tsx
modified: src/routes.ts
# 🚨 Slack: "Critical bug in prod, need fix on main ASAP!"
my-project (feature-branch) — dirty working tree
my-project
.git
src
dashboard.tsx
routes.ts
package.json
main
feature-branchHEAD
What do you do?