Episode 1 of 7GitHub for Beginners

What is GitHub?

The video only loads when you click the picture. Until then your browser does not connect to YouTube.

A folder has no memory

You have a folder on your computer with a project in it: a website, a book, some code. Now try to answer three questions. What did it look like a week ago? What did you change yesterday? And if two people work on it, who changed what?

A normal folder can't tell you. It holds one version, the latest. Overwrite something and it's gone. That's why so many of us end up with files called “site-final”, “site-final-2” and “site-final-REALLY”. It works until the day it doesn't.

Git gives the folder a memory

Git is a program that does exactly that. Every time you tell it “save”, it takes a snapshot of the whole project and keeps it. You can go back to any snapshot whenever you like.

Linus Torvalds wrote Git in 2005 to manage the code of Linux, which thousands of people work on at the same time. Today almost every software team uses it.

GitHub is where that memory lives online

GitHub is a website. It takes your folder with its memory and puts it online, so it no longer depends on one computer and other people can see it and work on it with you.

The short version: Git is the memory, GitHub is its home on the internet. There are other sites like it, but GitHub is the biggest. It has belonged to Microsoft since 2018.

Repository, or just “repo”

A project folder together with all its history is called a repository. Almost everyone says “repo”. One repo is one project.

What a repo page shows

At the top of a repo page you see its name and who owns it. In the middle is the list of files, just like a folder on your computer. Next to it there's a number with a small clock: how many snapshots have been saved so far. Those snapshots are the next episode.

Under the files there's usually a file called README. It's the project's front page: what it does and how to use it. GitHub shows it automatically, so it's the first thing every visitor reads.

A repo page on GitHub: the repo name at the top, the file list, “3 Commits” with a clock icon, and the README below.12
  1. 3 Commits: how many snapshots this repo has so far.
  2. README: the project's front page, shown under the files.

This example is octocat/Hello-World, GitHub's own public demo repo. Other people's names are blurred.

Public or private

A repo can be public, so anyone can see it, or private, so only you and the people you invite can. Both are free.

Create your first repo

  1. Go to github.com and create a free account.
  2. Click the + at the top right and choose New repository. (The video uses the green New button. The + menu at the top right does the same and is there on every page.)
GitHub's top bar with the plus menu open; the item “New repository” is marked.12
  1. Click the + at the top right.
  2. Choose New repository.
  1. Give your repo a name, for example my-site.
  2. Switch on Add README. GitHub used to show this as a tick box called “Add a README file”; today it's a switch that says On.
The “Create a new repository” form: the name my-site is typed in and the “Add README” switch is on.12
  1. Type the name of your repo.
  2. Switch Add README to On.
  1. Click the green Create repository button at the bottom.
The bottom of the form with the green “Create repository” button marked.1
  1. Click Create repository. That's it, your first repo exists.