Tuesday, 1/24 – Lab

Create a GitHub account and repository

  1. Sign up for a GitHub account. Use your newschool username and email.
    • If you already have a GitHub account and repository under your newschool username, rename the repository to something else, then move on to step 2.
  2. Create a repository called <YOUR_USERNAME>, e.g.

Set up your local machine

Install Git

  1. Open Terminal on your Mac Applications > Utilities > Terminal
  2. Type git and press enter
  3. Follow the instructions on screen to install OS X Dev Tools and Git
  4. Once installed, type git again and you should see git’s help text. This means it’s installed correctly.

Create and add an SSH key to your GitHub account

  1. Create an SSH key
  2. Add SSH key to GitHub

Set your Git username and email

  1. git config --global "<YOUR NAME>"
  2. git config --global "<YOUR EMAIL ADDRESS>"

Download and install software

  1. Sublime Text
    • If you have a preferred text editor you may use that instead.

Set up your working repository

Clone your repository

cd ~                       # change directory to home directory
git clone <YOUR REPO PATH> # clone the new repo you created on GitHub

Upload your changes to the GitHub server

  1. Create a file in your <YOUR_USERNAME> directory named index.html
  2. Use git to add this file and commit the changes to GitHub:
git add .                    # tell git you want to add all files
git commit -m 'first commit' # commit these files with a message
git push                     # push these files to the remote server

View your new website

Visit your new website at http://<YOUR_USERNAME>