Plain git makes it difficult to work on multiple branches in parallel
With plain git, to work on multiple branches at the same time, we must either:
- Commit the changes to a branch and switch to another. The big downside is that we would sometimes be forced to commit broken code.
- Stash the changes and switch branches, but stashes aren’t attached to a specific branch, so we can easily lose track of what we were working on.
- Copy the repo directory manually, which gives us two detached git histories - risky!
see Git worktrees allow working on multiple branches in parallel for how to leverage git worktrees to resolve that problem