MacOS – Does iCloud Drive backup hidden dot folders/files such as .git

icloudmacmacos

The folders/files don't show up on www.icloud.com so I presume I would need a second machine to verify via terminal.

Can anybody test this?

I'm specifically trying to ensure that my local .git file is backed up as I'm keeping this project local (not pushing to GitHub). I've tried chflags nohidden .git in my repo dir but that doesn't cause it to show up.

Seems like there's no way to "unhide" "dot files" such as .git so that they appear in Finder (even if you remove their hidden flag – confirmed via ls -alO).

I also tried creating a symbolic link using ln -s .git dot_git which did not show up on iCloud.com.

Best Answer

I've decided that because I can see the files within my iCloud folder in Finder by unhiding all hidden files, they are also backed up.

Confirmed with colleague that .git folder persists across machines!