Git Worktree: How to Work on Multiple Branches at Once
You鈥檙e three files into a feature branch, nothing committed, when a teammate pings you about a null-pointer crash in production. The usual move is git stash, check out main, fix it, push, then git stash pop and hope nothing in your half-finished feature depended on the files you switched away from. git worktree skips the shuffle. It checks out the hotfix branch into a second folder, next to your feature branch, with both backed by the same repository. ...