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
OneDrive does not (yet!) support syncing files that start with periods, like the .git folder where the git metadata is saved to.
Because of this you are not seeing those items sync over OneDrive.
(This is only the case with old version of the OneDrive Client, I've created a new answer that reflects the current versions capabilities 8/2015)