I keep my git repositories in a directory under Documents directory, which puts it in the path of iCloud's Optimized Storage. Often, I'll open a git repository to find files replaced with
.icloud placeholder files. Current workaround is resetting the workspace changes, but I sense this may cause some issues.
Is there a way to exclude subdirectories or files from Optimized Storage? Or any another means to deal with this situation? I do not wish to disable Optimized Storage altogether.