Right now, the files you’ve been working on are stored locally onto your computer. In order to upload it to the internet so others can also see, we have to deploy our website online.
[toc]
Click the plus sign in the upper right and click create new repository
Name your new repository username.github.io
, except replacing username with your own username (eg: mine would be gracejiang.github.io
)
cd
commands (use pwd
to check you are in the right directory)git init
git remote add origin https://github.com/username/username.github.io.git
, replacing username with your own username
git remote add origin https://github.com/gracejiang/gracejiang.github.io.git
Copy and paste each line into your terminal / command line
git add .
: adds all files to staging area
git commit -m "build site"
: prepares all files in staging area to be pushed
git push origin master
: pushes all files to your github repo
Your website is now live at https://username.github.io (replacing username with your own username)
Eg: mine is https://gracejiang.github.io
Changes to live will usually take a while, so check back to your website in 5-10 minutes