Lesson 9 of 15

Introduction to GitHub

What is GitHub?

GitHub is a web platform built on Git that adds collaboration features. It's the largest code hosting platform with over 100 million developers.

  • Host Git repositories in the cloud
  • Collaborate with pull requests and code reviews
  • Track issues and project management
  • Automate workflows with GitHub Actions
  • Host documentation and websites with GitHub Pages
  • Free for public and private repositories

Creating a GitHub Repository

You can create a new repository on GitHub and connect it to your local project.

Example
# Option 1: Create on GitHub first, then clone
git clone https://github.com/username/my-repo.git
cd my-repo

# Option 2: Connect existing local repo to GitHub
git remote add origin https://github.com/username/my-repo.git
git branch -M main
git push -u origin main

GitHub Features

Beyond hosting code, GitHub offers many tools for developers.

  • Issues — track bugs, features, and tasks
  • Pull Requests — propose and review changes
  • Actions — CI/CD automation
  • Projects — kanban-style project management
  • Discussions — community Q&A
  • Pages — free static website hosting