Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github repo cloned to synced iCloud drive on multiple computers

I have a couple of Macs onto which I clone a fair number of git (mostly GitHub) repos. The Macs each have a number of iCloud drive synced directories (in fact I've gone all-in and am syncing Desktop and Documents).

I have tried to clone into the iCloud-synced directories. However, I have been having lots of problems with this. It seems very easy to get into a condition where iCloud (not git) gets so confused that one machine effectively stops syncing, even files that have nothing to do with the cloned directories, and even if I carefully re-sync each of the two clones to the exact same state. I don't know if the problem is files under .git/ or just something like race conditions between versions of the actual repo files.

I've tried to use Apple's various iCloud logging tools under brctl but that has generally not helped.

Has anyone else seen this or anything like it?

(This is somewhat different from this question which mostly seems to care about a single Mac with iCloud drive, and I don't think users in that situation would see the same issues that I am.)

like image 843
Andrew Jaffe Avatar asked Mar 04 '19 22:03

Andrew Jaffe


1 Answers

I have found the icloud and git do NOT play well together. icloud sticks dot files everywhere and if you're doing node with giant node_modules directories it makes for madness. It will restore old files and your repo is git functions are basically competing with whatever random backup and syncing icloud is doing.

My lesson is to NOT put any repos in any place that icloud is backing it up. Besides it's redundant if you have a git or bitbucket (or remote git) account elsewhere, since then by definition the repo is the restorable in a versioned way.

like image 122
jeffg Avatar answered Oct 07 '22 08:10

jeffg