GitIntroduction to GitHub

Introduction to GitHub

GitHub is a hosting platform built on top of Git. Git is the version control tool that runs on your laptop; GitHub is the website (and API and apps) where you push your repos so the rest of the world — or just your teammates — can see them, clone them, review your code, run CI, and collaborate. Git without GitHub is fine and complete; GitHub without Git makes no sense at all.

Git vs GitHub — the one-sentence answer

Git

GitHub

What is it

A program you install

A website / service

Runs where

Your laptop, locally

Microsoft's servers in the cloud

Made by

Linus Torvalds, 2005

GitHub Inc., 2008 (now Microsoft)

Core job

Track file history

Host repos, collaborate, run CI

Cost

Free, open source

Free tier + paid plans

Replaceable

Hard — it's the standard

Yes — GitLab, Bitbucket, Codeberg, self-hosted

What a GitHub account gets you (free tier)
  • Unlimited public repositories with unlimited collaborators.

  • Unlimited private repositories with unlimited collaborators (this used to cost money — it's free now).

  • 2,000 Actions minutes/month for CI on private repos. Unlimited minutes for public repos.

  • 500 MB of Packages storage for npm, Docker, Maven, etc.

  • GitHub Pages — free static site hosting on *.github.io.

  • Issues, Discussions, Wiki, Projects — all included.

  • Codespaces — 120 core-hours/month of cloud dev environments.

  • Copilot — free for verified students and maintainers of popular OSS projects.

A quick tour of what's inside
  • Repositories — the core unit. A repo is a Git project plus the metadata GitHub layers on top (issues, PRs, settings, releases).

  • Issues — the bug tracker / TODO list. Markdown-formatted, taggable, assignable.

  • Pull Requests (PRs) — propose merging one branch into another, with review, comments, status checks, and a merge button.

  • Actions — built-in CI/CD. YAML workflows in .github/workflows/ run on every push, PR, schedule, or webhook.

  • Pages — free static hosting straight from a branch or build output.

  • Releases — tagged versions with downloadable artifacts and release notes.

  • Discussions — long-form Q&A and announcements (think StackOverflow inside the repo).

  • Gists — single-file snippet sharing (covered in its own page).

  • Organizations — shared accounts that own repos for a team or company.

  • Projects — kanban boards / spreadsheets that span repos.

  • Codespaces — cloud VS Code dev environment in your browser, one click away from any repo.

  • Packages — registry for npm/Docker/etc. tied to your repos.

  • Sponsors — a way for users to fund maintainers.

A typical day uses maybe four of those

What most engineers actually touch

Text
+----------+      +-------+      +-----+      +---------+
| your repo| <--> |issues | <--> | PRs | <--> | Actions |
+----------+      +-------+      +-----+      +---------+
                                     |
                                     v
                              merge to main
Why GitHub won
  • Showed up early (2008) with a clean UI when SourceForge and Google Code were stagnant.

  • Made pull requests easy and social — the fork-and-PR model became the OSS default.

  • Generous free tier kept adding features (free private repos in 2019, free Actions, free Codespaces minutes).

  • Network effect — most developers already have an account, so it's the lowest-friction place to publish.

  • Microsoft acquired it in 2018 and (mostly) left it alone while pouring money into CI, Copilot, and infrastructure.

The serious alternatives

Platform

Hosted?

Open source?

Why pick it

GitLab

gitlab.com + self-host

Community Edition is OSS

All-in-one DevOps; strong CI; popular in enterprise.

Bitbucket

bitbucket.org

No

Tight Atlassian integration (Jira, Confluence).

Codeberg

codeberg.org

Yes (Forgejo)

Non-profit, EU-based, OSS-only.

SourceHut

sr.ht

Yes

Minimal, email-driven, fast as lightning.

Gitea / Forgejo

self-host

Yes

Light, easy to run on a $5 VPS.

Azure DevOps

dev.azure.com

No

Microsoft shop with heavy enterprise needs.

AWS CodeCommit

AWS

No

You already live in AWS IAM.

Your first interaction will look like this

Clone a public repo from GitHub

Bash
# HTTPS — works everywhere, may prompt for a token to push
git clone https://github.com/torvalds/linux.git

# SSH — preferred once you have added an SSH key (see SSH Keys page)
git clone git@github.com:torvalds/linux.git
GitHub is one of many remotes
Git was designed to be **distributed** — there's no privileged server. GitHub feels like the centre of the universe because so many projects live there, but as far as your Git client is concerned, it's just a remote URL like any other. The same `git push` command works against GitHub, GitLab, Bitbucket, or a server you set up yourself.
Tip
If you don't have an account yet, head to the next page — Creating a GitHub Account — and walk through signup, 2FA, and the settings you should turn on immediately. It takes about ten minutes and you only do it once.