Some words about my setup:
MacOs Catalina 10.15.2
Talking about git
project folders on my Desktop which is synced with ICloud D
You should not use Git and syncing services (such as iCloud and Dropbox) together.
The reason is that these syncing services consider individual files as separate, logical documents to be synced. When you're working on a word processing document or a spreadsheet, that assumption is true. However, it's not true for Git repositories, which expect POSIX file system semantics to ensure the integrity of the repository and which modify many files in quick succession.
Because these syncing tools don't ensure that your repository state is read as a snapshot (either in the working tree or the .git
directory), they're likely to corrupt your repository, and won't be effective as a backup or syncing tool. If you want to use these service for backup, you should tar up the .git
directory or create a Git bundle and put it into a location to be synced instead.