Github resources - selmling/Analytics-and-Data-Exploration GitHub Wiki
The repo in this case is local and already exists, and you just want to put it on github
-
Create a repo on github.com
-
Within the local project folder, remove git:
rm .git /S/Q
-
Initialize a new git repo:
git init
-
Add all the files in your project to the repo:
git add .
-
Add a commit with comment:
git commit -m "initial commit"
-
Upload to repo:
git remote add origin URL
git push -u origin master
* Note that github will need a personal access token instead of a password -- see github docs on the matter to resolve.
This is where a repo already exists on github.com but you want it on your local machine
-
First time:
git clone /path/to/repository
-
Thereafter:
git pull
This is where you have a version of the repo locally, but need to push the updated files to github.com
-
Add the new files:
git add .
-
Commit new files with a message:
git commit -m "Commit message"
-
Point to target github repo (only run this on first push):
git remote add origin <server url>
-
Push your commit to the repo:
git push origin master
* Note that if this command hangs after the
Total
line, see this SO post.