3 ms·
I thought it was common knowledge that you shouldn't mix git (and similar VCS) with cloud drives and their cloud based version control (iCloud, OneDrive, Google
by laurels-marts 3y ago
I thought it was common knowledge that you shouldn't mix git (and similar VCS) with cloud drives and their cloud based version control (iCloud, OneDrive, Google Drive etc.). The two don't mix well and there's room for all sorts of weird and unexpected behaviours especially if you have multiple devices synced to the same cloud drive.
- dpc_01234 3y agoI'm using syncthing to keep bare repos of my git dotfiles and alikes. Never any issues.
- JeremyNT 3y agoI do the same. I think the golden rule here is to only work directly with the repo on a single device. Otherwise there is a lot of useless churn and more potential for conflicts. If you want to work with it on multiple devices, you can still sync it around, just work with a new clone of that repo rather than modifying it directly from multiple places. Then push your changes into the synced repo and act like it's really remote instead of local. This does use more storage, however.
- crazygringo 3y agoYup, you definitely shouldn't. I don't know if it's common knowledge so much as some git operation will start failing after the fifth commit, so you figure it out pretty quick. I do have to say, I've never understood why git doesn't work well with cloud drives. File management seems like a straightforward enough set of operations that ought to be bulletproof. I've never understood what precise operation gets corrupted when using git, and how that's possible at all. And I don't know if the fault is the cloud or git. Is it that the cloud returns errors 0.5% of the time, and git silently ignores those instead of retrying, and corrupts data? Or is it something about git reading and writing so many files so quickly that operations on the cloud drive somehow get lost or out of order but without generating errors? Both seem equally implausible, and yet...
- jquast 3y agoI think it’s because git provides atomicy, requires it, requires you to make decisions on merge conflicts, etc while cloud sync makes invisible arbitrary decision of which file is newer, if there is a “conflict” like the same filename but different hashes and sizes, it will happily “clobber” your git database records by arbitrarily choosing which file is “better”