3 ms·
There's another case where worktrees are great, whether or not you are compensating for other problems. If your project's build takes forever, but incremental b
by tomjakubowski 3y ago
There's another case where worktrees are great, whether or not you are compensating for other problems. If your project's build takes forever, but incremental builds are relatively fast, worktrees are a good way to preserve build state on the file system between branch switches.
- coldtea 3y ago>worktrees are a good way to preserve build state on the file system between branch switches. Why would you ever have build artifacts, incremental or not, as part of your code repo?
- neandrake 3y agoIt’s probably not part of their repo, but exists alongside, possibly gitignored. Either way in the same workspace the IDE will have to invalidate a lot of it when you switch, and again so when switching back. Separate clones, or worktrees, mean they don’t get invalidated and your IDE just sees them as a separate project altogether, each with its own cache, regardless of where that cache exists.