Teaching / Intro to Web Dev / GitHub Setup

GitHub Setup


GitHub

GitHub is a website that lets you post your code so you can keep it organized and share it with other people. It’s a little bit like social media for coders, and it’s a great way to show off your code and to see what other folks are working on.

We’ll be using GitHub to share code with each other. Before you get started, sign up for a GitHub account.



Git

Git is a tool that lets you store your files so you can work from multiple computers, or with other people. It’s commonly used by people working on code projects together, since it lets everybody work with the same files. It’s also handy when you’re working on your own, because it lets you track your changes over time.

Git is a version control system which is a fancy way of saying that Git helps you track different versions of files. If you’ve ever written a paper and then saved a file called my-paper-final.txt and then realized you needed to change it, so you saved a file called my-paper-final-2.txt and then made even more changes, eventually saving a file called my-paper-final-really-final-this-time-3.txt, then that’s another kind of version control system. Git is a way of automating that.

We won’t use Git directly in this class, but I’m mentioning Git because GitHub uses it behind the scenes.

Fork the Class’s Project Repository

GitHub organizes code into repositories, or repos, which you can think of as a directory full of files.

The Intro to Web Dev repo contains starter code and instructions for each week’s project.

Make a copy of the repo (also called forking the repo) by clicking the Fork button in the upper-right corner of the Intro to Web Dev repo.

fork button

forking repo

This should create another repo called YourName/intro-to-web-dev.

GitHub Pages

GitHub Pages lets you take a GitHub repository and turn it into a website.

Enable GitHub Pages for your project repo. Starting at your repo’s homepage, go to the Settings tab, and then select Pages in the left nav.

In the Source section, select the main branch. Then click the Save button.

GitHub Pages setting

GitHub Pages process

GitHub Pages result

When you’re done, GitHub will give you a URL like YourUsername.github.io/intro-to-web-dev. This URL won’t work yet, but remember it because you’ll need it in a minute.


When you’re finished, continue working through week 1: