-
-
Save ThuanNP/caf301f5b2b58cd298ba9c317d6f9ab1 to your computer and use it in GitHub Desktop.
Setup git repo on onedrive.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Go to onedrive folder in your pc and create a folder for git repository. | |
Usually onedrive resides in `C:\Users\%username%\OneDrive` | |
Open GitBash | |
cd ~/OneDrive | |
mkdir git | |
cd git | |
mkdir myproject | |
cd myproject | |
git init | |
git config --bool core.bare true | |
Now go to your workspace.. generally this will be any folder in your PC, outside of OneDrive.. | |
Never create your workspace in onedrive or it will save all the files from node_modules. | |
Lets say worspace is in D:\workspace | |
Open GitBash | |
cd D:/workspace | |
git clone ~/OneDrive/git/myproject | |
cd myproject | |
touch testfile.txt | |
git add . | |
git commit -m "initial commit" | |
git push origin master | |
Congratulation.. you have a private git repository on cloud. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment