I am trying to create a git repository located within a OneDrive synced folder, but I am running into an issue.
I use OneDrive to sync folders between my multiple device
I had the same using DropBox and also OneDrive.
It takes some time before folders are completely synced and the other clients are completely aware of the changes. If something is missing git complains as it is expected to do.
Manually forcing a sync on both sides solves it.
I suspect that the way it's implemented on (or used by) Windows causes it. Dropbox on Ubuntu didn't show the issues. (Unless I was to much in a hurry and expected a full sync on my other box 3 secs later ;-))
I gave up on the DB & OD solution. In the end I decided to take an account on github. Much more convenient.
Installing something like GitLab or Gitblit (using Tomcat on Win) on a box will help too for private repos.