git worktrees changed how I branch

The problem: you're deep in a feature branch. A bug report comes in that needs a hotfix on main. You've got uncommitted changes. You either stash (and lose context) or commit something temporary (and pollute your history) or open a second clone of the repo (and lose your mind when you forget which is which).

git worktrees let you check out a second branch into a separate directory without cloning the repo. They share the object store, so no redundant downloads. It's fast and it works.

terminal
# add a worktree for the hotfix branch
git worktree add ../myrepo-hotfix main
cd ../myrepo-hotfix
git checkout -b hotfix/critical-thing
# do the work, push, come back
cd ../myrepo
git worktree remove ../myrepo-hotfix

Your original working directory is untouched. Your stash is clean. The worktree is just a directory — open it in a new terminal tab, do the work, remove it when done. I've been doing this for two months and it's eliminated every "let me just quickly stash this" situation I used to have.