Git and Github

Housekeeping

  1. CPNT 201 Assignment 1 Announced
  2. FreeCodeCamp HTML/CSS exercises will eventually be for marks if you’re bored this weekend. Important: make sure you create an account and sign-in so your progress is saved.

See: Terminology

Starting project

Find a project in [sample-code] (or use one of your own) that is a static website with an index.html file in the root directory. You can use this as a sample project for the below exercises.

Complete the following

  1. First Time Setup
  2. Cloning a read-only repo
  3. Initializing a new local repo
  4. Committing changes to a local repo
  5. Create and sync a remote repo
  6. Push commits to a remote repo

End of day goal: Publish a website to GitHub Pages

Once you’ve completed the above steps and pushed a static website to GitHub, try publishing it on GH Pages.

Prerequisites

  • Remote repo with an index.html in the root directory.
  • If you’re publishing your user website (i.e. not one of your repos) your repo must be named <username>.github.io.

Enabling GH Pages

  1. Go to the Settings tab of the repo.
  2. Scroll down to the “GitHub Pages” section.
  3. Select Source as main (it’s sometimes master) and /root.
  4. Save your changes.
  5. Wait a few minutes and your website should be live at <username>.github.io/<repo-name> (or just <username>.github.io if it’s your user site).

Paste your published site in #winter-2021 and you can go hoooooome at lunch!


Clean-up Time!