Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

git - 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.)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...