Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Git and iCloud Drive be effectively used together?

Tags:

In the same flavor as this question, are there any possible complications that can arise when using the two services together?

like image 827
Matt Avatar asked Mar 07 '16 20:03

Matt


People also ask

Can I use both OneDrive and iCloud?

Thus, they can see all the files in both cloud storage or they can keep a backup version of important data. So, is there a way to sync iCloud Drive with OneDrive? The answer is yes.

Can I use both Dropbox and iCloud?

Since both Dropbox and iCloud Drive will create an auto-sync folder on your computer after downloading and installing the desktop app, you can take advantage of the Dropbox and iCloud Drive folder to sync your files. Follow the steps below to create Dropbox and iCloud Drive folder and sync files between them.

When should you use iCloud Drive?

How iCloud Drive works. You can store documents, images and spreadsheets using iCloud Drive; you can also keep files and folders up-to-date across devices, work on them, and access these items from anywhere. On iOS devices, you access your iCloud Drive through the Files app.


2 Answers

No, they shouldn’t be used together.

  • Apple says “You shouldn’t store app folders, libraries, or .tmp files in iCloud Drive.” .git is an app folder.
  • There is a list of filenames excluded by iCloud Drive that git doesn’t avoid. So, for example, if you name a tag “tmp”, that tag won’t be synced. There’s also nothing stopping git modifying its internal file structure, or iCloud Drive modifying its exclusion list, such that this sync failure always occurs.
  • iCloud Drive ignores symlinks, git doesn’t. So, git status may return different results on different computers that iCloud Drive is done syncing.

More broadly speaking, git and iCloud Drive are two different lossy implementations of “what are the contents of this directory”, one shouldn’t expect them to be equivalent.

like image 143
twhb Avatar answered Oct 26 '22 07:10

twhb


Be careful especially if you enable the Optimised storage feature, where not all files in iCloud Drive are stored locally and may instead be requested on-demand.

From my tests, it appears git doesn't trigger the OS to request the file, and instead picks up the placeholder file, named something like .original_filename.icloud.

like image 45
tobygriffin Avatar answered Oct 26 '22 07:10

tobygriffin