How to Deploy a Local Project onto Github
This passage covers the major steps of deploying your local project (files in a well-structured folder) onto a Github repository. Here we take
~/Desktop/XGBoost as an example, in which I have three
Python scripts and a
Readme.md doc. Make sure you have the command line tool
Git installed already.
Terminal.appand enter the directory of the folder.
Initialize the directory to a
Now you'll see a
.git file (which is hidden actually, but you can opt to show hidden files using terminal commands) in the folder
XGBoost. (3) Add all files into the local
git add .
You can substitute
. with the files you want to add, e.g.
main.py, if not all items in the directory do you want to deploy. (4) Deploy your local project to
git commit -m "Initial commit"
Github. Create a new repository named
XGBoostor whatever. Copy the
.giturl of your repository, e.g.
Go back to the terminal and type the following.
git remote add origin https://github.com/allenfrostline/xgboost.git
Run the following script to see if you've seccessfully deployed your files.
git remote -v
Any time in the future if you want to deploy/update your files, run under the same directory:
git push origin master