Quantcast
Channel: JPHellemons
Viewing all articles
Browse latest Browse all 132

Put a git repo on OneDrive

$
0
0


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?

  1. Move the full folder inc .git hidden dir outside OneDrive
  2. git init –bare c:\Users\youruser\OneDrive\reponame.git
  3. in the dir outside OneDrive: git remote add onedrive c:\Users\youruser\OneDrive\reponame.git
  4. 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!


Viewing all articles
Browse latest Browse all 132

Trending Articles