I basically only use Dropbox because it is supported on Linux. Also its syncing technology is sooo much better than Google Drive you would think Drive was built by interns. However, they are taking their sweet time with newer features like Smart Sync. It's disappointing because I'm paying for these features and yet they're not supported on one of the platforms my whole company uses. All in all I really hope Dropbox doesn't keep chipping away at Linux - I fought hard internally to use it and I don't want to be proven wrong.
There's a decent open source sync daemon for OneDrive on Linux - I'm the packager who looks after it on Fedora. With the odd exception when APIs change it just works.
OneDrive doesn't support dotfiles and thus can't sync Git repos.
This does not appear to still be the case based on testing just now (creating a folder named ".foldername", containing a file named ".testfile" then verifying that they've synced up to OneDrive). Several years ago it didn't support syncing folders with a . in the name, but that was resolved 3 years ago.
With Microsoft's relatively new focus on Git, I can't imagine that problems with repositories stored in OneDrive folders would remain unfixed.
I will note that there are names that Windows Explorer won't let you create - notably, names beginning with a ".". That's an Explorer issue, not a OneDrive or filesystem issue - you can create such files and folders programmatically or from a command prompt.
Err... I can’t imagine a scenario where one would want to use OneDrive/Dropbox to sync git repositories. It’s like having your local Dropbox folder inside your local OneDrive folder — only a lot worse.
I keep my .tex, .md, and .org files under source control, but I don't bother syncing to GitHub. I just back them up with the rest of my personal (non-code) files.
This just sounds like a horrible scary idea. What happens if I change something in a repo on multiple machines - a OneDrive merge conflict inside .git sounds like a nightmare.