I've just learned about the git worktree feature. It seems to fit my use-case well: I'm used to having a separate repo clone to do side tasks on.
I'm working in a big monorepo with lots of frequent commits and lots of files. It is so big that many tasks are slow. In particular, git fetch
and git push
, but even git status
is no longer instantaneous.
So, git worktree
sounds like a good idea, BUT it is absolutely not worth it if it impacts performance negatively in any noticeable way.
Are there commands or scenarios where multiple worktrees cause git to perform worse? For instance, does git fetch
need to do more and thus take longer?
I am trying it out myself right now. But it is not easy to make precise performance comparisons. E.g., it is hard to do the same git fetch
twice.
git status
. – Rugger