Update 2022
update 2022: this method doesn't work anymore. you need to change the directory name to *.nosync, as described in other answers.This method doesn't work anymore. you need to change the directory name to *.nosync
, as described in other answers.
Adding one empty file named .nosync
to a folder will prevent that folder from syncing.
You can also use this as a file extension to specific files, but the folder treatment is quite useful.
Once you've had a folder sync, you can now also prevent it from syncing on some (or all endpoints) with a utility named Bailiff, if for some reason you don't want just to delete the files from iCloud entirely and instead want to prevent the next "initial" sync.