GitGitHub Platform

GitHub Platform Overview

GitHub is the world's largest code hosting platform with over 100 million developers and 400 million repositories. It started as a Git hosting service in 2008 and has since grown into a complete software development platform — covering everything from version control and code review to CI/CD, package management, project management, and AI-assisted development.

Core features
  • Repositories: unlimited public repos on all plans; unlimited private repos on Free.

  • Pull Requests: structured code review with inline comments, review approvals, and status checks.

  • Issues: bug tracking, feature requests, task management with labels, milestones, and assignees.

  • GitHub Actions: built-in CI/CD (covered in depth in the CI/CD section).

  • GitHub Pages: free static site hosting directly from a repository.

  • GitHub Packages: private/public registry for npm, Docker, Maven, NuGet, PyPI, RubyGems.

  • Discussions: forum-style conversations for open-ended questions, separate from Issues.

  • Projects: Kanban and table views for managing work across repositories.

  • Security: Dependabot alerts, secret scanning, code scanning, security advisories.

  • Codespaces: cloud-based development environments in the browser.

  • GitHub Copilot: AI pair programmer integrated into VS Code, JetBrains, and the browser.

Plan comparison

Feature

Free

Pro ($4/mo)

Team ($4/user/mo)

Enterprise ($21/user/mo)

Private repos

Unlimited

Unlimited

Unlimited

Unlimited

Collaborators

Unlimited

Unlimited

Unlimited

Unlimited

Actions minutes (private)

2,000/mo

3,000/mo

3,000/mo

50,000/mo

Packages storage

500 MB

2 GB

2 GB

50 GB

Required reviewers

No (public only)

Yes

Yes

Yes

Branch protection

Limited (public)

Full

Full

Full

Code owners

Public only

Yes

Yes

Yes

Environments

Public only

Yes

Yes

Yes

Advanced Security

No

No

No

Yes

SAML SSO

No

No

Yes (org level)

Yes

Audit log

No

No

Limited

Full

GitHub Copilot

Add-on

Add-on

Add-on

Included

GitHub CLI (gh)

The gh CLI lets you interact with GitHub entirely from the terminal — creating PRs, managing issues, triggering workflows, and more without opening a browser.

Common gh CLI commands

Bash
# Install
brew install gh              # macOS
winget install GitHub.cli   # Windows
sudo apt install gh          # Ubuntu

# Authenticate
gh auth login

# Create a pull request
gh pr create --title "Add payment feature" --body "Implements Stripe integration"

# View open PRs
gh pr list

# Check out a PR locally
gh pr checkout 42

# Merge a PR
gh pr merge 42 --squash

# Create an issue
gh issue create --title "Bug: login fails on mobile" --label "bug"

# View workflow runs
gh run list
gh run view 12345

# Trigger a workflow manually
gh workflow run deploy.yml --field environment=staging

# View a repository's details
gh repo view owner/repo
GitHub API and Octokit

The GitHub REST and GraphQL APIs give you programmatic access to every GitHub feature. Octokit is the official SDK for the API.

GitHub REST API examples with curl

Bash
# List your repositories
curl -H "Authorization: Bearer $GITHUB_TOKEN" \
  https://api.github.com/user/repos

# Create an issue
curl -X POST \
  -H "Authorization: Bearer $GITHUB_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"title":"New issue","body":"Issue body"}' \
  https://api.github.com/repos/owner/repo/issues

Octokit JavaScript SDK

JS
import { Octokit } from '@octokit/rest'

const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN })

// List pull requests
const prs = await octokit.rest.pulls.list({
  owner: 'octocat',
  repo: 'hello-world',
  state: 'open',
})

// Create a comment on a PR
await octokit.rest.issues.createComment({
  owner: 'octocat',
  repo: 'hello-world',
  issue_number: 42,
  body: 'Looks good to me! 🚀',
})
GitHub Codespaces

Codespaces provides a full cloud-based development environment running in the browser (VS Code in the browser) or connecting to VS Code Desktop. It eliminates the "works on my machine" problem by giving every developer a consistent environment defined in a .devcontainer/ configuration.

.devcontainer/devcontainer.json

JSON
{
  "name": "Node.js App",
  "image": "mcr.microsoft.com/devcontainers/javascript-node:20",
  "features": {
    "ghcr.io/devcontainers/features/git:1": {}
  },
  "postCreateCommand": "npm ci",
  "customizations": {
    "vscode": {
      "extensions": [
        "dbaeumer.vscode-eslint",
        "esbenp.prettier-vscode",
        "GitHub.copilot"
      ]
    }
  },
  "forwardPorts": [3000],
  "remoteUser": "node"
}
  • Free tier: 60 core-hours/month (a 2-core machine runs for 30 hours).

  • Spin up in ~30 seconds with your full dev environment ready.

  • Pre-build Codespaces to reduce startup time.

  • Access from any device with a browser — great for quick reviews on mobile.

GitHub Advanced Security

GitHub Advanced Security (GHAS) is included in Enterprise plans and available as an add-on for Team plans. It adds three major security capabilities:

Feature

What it does

Free on public repos?

Secret scanning

Detects API keys, tokens, passwords in code and commit history

Yes

Code scanning (CodeQL)

Static analysis that finds security vulnerabilities in your code

Yes

Dependabot alerts

Alerts when dependencies have known CVEs

Yes

Dependabot security updates

Automatically opens PRs to update vulnerable dependencies

Yes

Push protection

Blocks pushes that contain detected secrets before they reach the repo

Public repos only

Secret scanning is free for public repos
If you maintain an open-source project, enable secret scanning immediately — it is free and will alert you if anyone accidentally commits a password or API key.
GitHub Copilot
  • AI pair programmer that suggests code completions and entire functions.

  • Available in VS Code, JetBrains IDEs, Neovim, Visual Studio.

  • Copilot Chat: conversational AI that can explain code, write tests, fix bugs.

  • Copilot in pull requests: AI-generated PR summaries and review suggestions.

  • Copilot Workspace: AI-powered environment for planning and implementing changes.

  • Pricing: Individual $10/month, Business $19/user/month, Enterprise $39/user/month.

Tip
GitHub is free for students through GitHub Education (github.com/education) — this includes Copilot, Team plan features, and many third-party tools for free.