Should I have a DerivedData folder for each git branch?

197 Views Asked by At

I often switch branches and compile my project, and I have a git worktree so I have work on two branches at the same time (ex: current code and PR review). However, Xcode is currently setup to use one DerivedData location.

Would it be better to specify a DerivedData folder for each branch? Or at least for each git worktree?

1

There are 1 best solutions below

4
On

No need for separate DerivedData locations for different branches - each switch (checkout) refreshes the timestamp on the source files which changed with the switch so they will recompile automatically.