Create Account
Sign up for an account at GitHub.
Install Github Desktop
Download the Github Desktop application and install it on your computer.
Clone this Repository
This repository contains all of the demos for the class in the demos
folder. You can have access to the latest code on your computer by cloning this repository, and syncing as needed.
- Go to this repository on Github and click the green
Clone
button and chooseOpen in Desktop
- When you press this button, it should launch the Github desktop application you downloaded before.(If it doesn’t happen, open the application manually.)
Your local repositories
For the local path, select a place on your computer where you want the local
version of your projects to live. Select the Choose
button, navigate to the folder where you plan to save your work for this workshop, then press the Open
button. It might be somewhere like /Users/motsuka/Sites
.
Github will create a folder named web-typography-workshop
there. This is the local
version of this github repository.
Create your Repository
Log into github.com and create a new repository using the link under the + icon in the upper right of the GitHub homepage.
Name your repository yourusername.github.io. For example, my username is marieotsuka, so my repository should be named marieotsuka.github.io. When you create the repository, check the box to initiate with a .README file. This repository will be the home for all of your assignments and exercises for this class.
If you already have a Github account, you might make a different repository name instead. In this case, be careful of root-relative links, because your website will live in yourusername.github.io/project-name
Clone your Repository to your computer
Once you’ve initialized your repository, it will take you to the home screen of the repository
You should now have a folder called yourusername.github.io on your computer. Make sure to save all of your work into this folder.
Create your first Webpage
Paste the demos/01-starterkit folder contents into your new repository. Do not copy the entire folder, instead, select the files within the folder and copy them. The index.html page should be located directly within your repository folder.
Commit and Push to your repository
commit |
This will add and save any changes since your last commit to the local repository. It is a way to save a snapshot of your website — a version to go back to, as reference. This is the “Git” version-control program that is part of Github. |
push |
This will send your committed changes to a remote repository. This second step is necessary for to push your code to the Github servers, and for others to see the changes on your website. |
Confirm your Changes
Confirm you see changes made to your file in the Changes Tab
on the Github app. Fill in a brief description of the change you made in the Summary field — this is a note for your future self.
Press Commit
button and then Press Push Origin
in the top right tab
Check to make sure your changes were pushed to the master repository Reload your project GitHub home page.
Publish your website
In your GitHub.com repository page, find the “Settings” tab. Select Github Pages on the sidebar, and press the Select Source and choose master
from the dropdown. This is the source files for your webpage.
After you click save, click the link listed in the same section, which should be yourusername.github.io
to view your website that should say “Hello World”. You can now upload any page and publish it to the web.