How I Use Git Worktrees
matklad.github.ioThere are a bunch of posts on the internet about using git worktree command. As far as I can tell,
most of them are primarily about using worktrees as a replacement of, or a supplement to git
branches. Instead of switching branches, you just change directories. This is also how I originally
had useed worktrees, but that didn't stick, and I abandoned them. But recently worktrees grew
on me, though my new use-case is unlike branching.
I commit and squash before pushing the branch if I have to change what I’m working on. Keeps the changes on remote so I don’t lose progress. Not like a PR is open if the work I isn’t ready anyway.