← Back to context

Comment by al_borland

3 hours ago

I’ve seen a lot of people have issues with git, because this is going on in the background and they don’t realize it.

They’ll change branches, then OneDrive sees files are missing, so it starts pulling them back down. It makes a mess.

Any new hire we get, we need to make sure to explicitly tell them not to keep their code in a folder managed by OneDrive, but they never listen. They speak up about a month later, complaining about weird issues.

On my last laptop refresh I also had to manually enable the sync. It didn’t just happen. I knew if I used the local folders that would eventually stop working and things would get lost.

I’ve also seen a lot of confusion from people who save something to their desktop, and it’s not there… because they didn’t save it to their OneDrive desktop. This is always fun to explain.

OneDrive is also now our backup, but they only sync 3 folders from the home directory. If your work has you using other folders, good luck and enjoy your data loss. I setup a scheduled job to backup some of my other key files to OneDrive, but that was quite annoying. I’m sure I’m in the minority.

The enterprise enables all this stuff, but never actually tells anyone. They think it will “just work”, but it creates a confusing mess that every employee eventually has to figure out.

This is why we had to add some group policy changes to ban One Drive throughout our agency. Additionally, some of our work is "confidential" and non-public which also got the legislature to ban the use of One Drive for most stuff (they specifically stated "cloud").

It is irritating how Microsoft markets onedrive as a backup solution, because then people think 'oh, we have onedrive, why do we need another backup solution?', when onedrive is so unsuited to being the working copy of so many different kinds of data.

  • Also, it's not even a backup. If your files are only on OneDrive (which is the default "storage save" setting), good luck recovering them if they break into your account.

I keep my code in OneDrive. I probably have hundreds of repos cloned and active. Been going like this since like 2018 or so.

I’ve never had problems except for warnings about deleting lots of filed when I git branch or checkout or whatever.

I would expect onedrive not to pull down files after a checkout because from a file io, it’s deleting and copying in new files, right?

  • You're pretty lucky, then. This kind of file sync is a cursed problem in general (in that a truly robust solution is just not possible), but onedrive seems to be particularly bad in terms of reverting local changes, not syncing changes, and generally messing things up, especially when there's a lot of files, and even when there's only one user of the data. (it also makes anything involving writing lots of temporary files even slower, like most software builds).

  • It needs to read the repo under .git; that’s a lot of files that may not be synced, depending on local disk space, frequency of use, etc. The local disk is just a cache.

    There may be an option to Always keep on this device, which might help.