iCloud & iCloud Photos · iCloud Drive basics
Should I keep code projects, databases or app libraries in iCloud Drive?
Short answer: Best not to. Code repositories, build and dependency folders, databases and app catalogs change constantly and sync poorly — lagging uploads, conflict copies and evicted files. Keep them outside iCloud-synced folders and back them up separately.
It's best not to. Folders that change constantly in many small files — code repositories, build folders, dependency folders, databases and app catalogs — sync poorly: uploads lag behind, devices can see half-written states, and conflicting copies appear. Some files may also be made online-only when a tool expects them on disk.
Keep these somewhere iCloud doesn't sync — a folder in your home folder outside Desktop & Documents, or an external drive — and back them up separately (or use the project's own remote, like a code host). See the "file 2" duplicates in iCloud.