Hacker News new | ask | show | jobs
by solardev 1358 days ago
I learned about git "worktrees" the other day, which lets you have different branches of the same repo checked out at the same time. So, for example, you could have different node_modules/ folders (one per branch) and not need to reinstall them every time you switched. https://git-scm.com/docs/git-worktree

Sadly, the IntelliJ support for them was very weak (they worked, sort of, but project configurations etc. weren't copied over... it was essentially treated as a different project altogether).

I'm still not 100% sure how it's better than just checking out the same repo in different folders to begin with. But then again most of Git is totally confusing, lol.