For one of my hobby projects, I wanted to have my source code under source control. Professionally I use VSTS (Visual Studio Team Services) https://www.visualstudio.com/team-services/pricing/ which is great. But this is a hobby project which I code alone. So I did a git init and committed it locally.
I moved the complete Visual Studio solution + project (folder) and hidden .git folder to OneDrive and the cpu started to heat up. OneDrive keeps syncing and uses a lot of cpu. I tried to exclude the .git folder, but that did not help.
So what is the solution?
- Move the full folder inc .git hidden dir outside OneDrive
- git init –bare c:\Users\youruser\OneDrive\reponame.git
- in the dir outside OneDrive: git remote add onedrive c:\Users\youruser\OneDrive\reponame.git
- git push –u onedrive master
Do not forget to push sometimes to the remote. Or use in Visual Studio the “commit & push” button.
Thanks to Qiuwen Chen for pointing me in the right direction.
Good luck!