Using git to sync obsidian is good (there’s a community plugin).
Syncing your obsidian vault via git and iCloud drive will corrupt your .git folder.
make sure you add .obsidian to your .gitignore - you want separate .obsidian folders on each machine.