Comment by prepend
3 hours ago
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.