Collaboration Platform

GitHub

GitHub is where the world builds software. Here's what it is, how it works, and how to use it to collaborate, host code and build your developer career.

beginner16 min readUpdated Sep 15, 2026
bash
# Create a new repository on GitHub
# Then clone it to your machine
git clone https://github.com/your-username/my-project.git

# Make changes and push
git add .
git commit -m "Add README"
git push origin main
Created
2008, by Tom Preston-Werner, Chris Wanstrath and PJ Hyett
Type
Cloud-based collaboration platform
Owner
Microsoft (since 2018)
Repositories
330+ million
Developers
100+ million
Pricing
Free tier available, paid plans for teams

Why it matters

Why GitHub matters

Team collaboration

Pull requests, code review, issues and discussions let teams work together on code with transparency and accountability.

Automation

GitHub Actions automates testing, building and deploying your code. Set up CI/CD pipelines with YAML configuration.

Security

Built-in dependency scanning, secret detection and code review workflows help you catch vulnerabilities before they reach production.

The big picture

The three layers of GitHub

GitHub is a platform, a set of tools and a community. Understanding which layer you are using helps you get the most out of it.

GitHub

The platform

Cloud hosting for Git repositories with collaboration features like pull requests, issues and code review.

Git

The tool

The distributed version control system that runs on your machine and tracks all changes to your files.

Community

The people

Open source maintainers, contributors and teams who use GitHub to build, share and discover software.

GitHub at a glance

What the platform gives you

Repositories

Cloud-hosted Git repos with issue tracking, wikis, releases and access controls.

Pull Requests

Propose changes, review code, discuss alternatives and merge with a clear audit trail.

Issues

Track bugs, request features and manage tasks with labels, milestones and assignments.

Actions

CI/CD pipelines that automatically test, build and deploy your code on every push.

Codespaces

Cloud development environments that spin up ready-to-code instances of your repository.

Pages

Host static websites directly from your repository — documentation, portfolios and more.

A short history

From code hosting to developer ecosystem

  1. 2008

    GitHub launches

    Tom Preston-Werner, Chris Wanstrath and PJ Hyett create a platform that makes Git collaboration effortless.

    08
  2. 2010

    Pull requests arrive

    The pull request workflow transforms how teams review and merge code, becoming the industry standard.

    10
  3. 2013

    GitHub Actions announced

    CI/CD automation built into the platform, eliminating the need for external tools for many workflows.

    13
  4. 2018

    Microsoft acquires GitHub

    GitHub gains resources while staying independent, accelerating features like Codespaces and Copilot.

    18
  5. 2021

    Copilot and Codespaces

    AI-powered code suggestions and cloud development environments change how developers write code.

    21
  6. Today

    The developer platform

    100+ million developers, 330+ million repositories and the default home for open source software.

    Today

The complete guide

GitHub: Everything you need to know

What is GitHub?

GitHub is a cloud-based platform for hosting Git repositories and collaborating with other developers. It takes everything Git does locally — tracking changes, managing branches, merging code — and adds a web interface with tools for code review, issue tracking, automation and project management.

Think of Git as the engine and GitHub as the dashboard. Git runs on your machine, handling version control. GitHub hosts your repository online, letting others see your code, suggest improvements, report bugs and contribute features through a structured workflow.

With over 100 million developers and 330 million repositories, GitHub is where the world builds software. Open source projects, startups, enterprises and individual developers all use it as their primary collaboration platform. If you are learning to code, having a GitHub profile is as important as having a portfolio.

Why GitHub matters

Version control on your machine is useful, but collaboration requires a shared space. GitHub provides that space with features that make teamwork structured and transparent:

  • Centralized hosting — your code lives in the cloud, accessible from anywhere with a backup that never gets lost.
  • Pull requests — propose changes, review code line by line and merge only when everyone agrees.
  • Issues and project boards — track bugs, manage features and organize work with labels, milestones and kanban boards.
  • CI/CD automation — GitHub Actions runs tests, builds and deploys your code automatically on every push.
  • Community — discover open source projects, contribute to them and build your developer reputation.
  • Security — dependency scanning, secret detection and code review workflows catch vulnerabilities early.

GitHub is not just a code hosting service. It is a development platform that covers the entire software lifecycle from idea to deployment.

Setting up GitHub

Creating an account

Go to github.com and sign up with your email. Choose the free plan — it includes everything you need to get started.

Configuring Git

After creating your account, configure Git to work with GitHub:

# Set your identity
git config --global user.name "Your Name"
git config --global user.email "[email protected]"

# Set the default branch name
git config --global init.defaultBranch main

Connecting via SSH

SSH keys let you authenticate without entering your password every time:

# Generate a new SSH key
ssh-keygen -t ed25519 -C "[email protected]"

# Start the SSH agent
eval "$(ssh-agent -s)"

# Add your key to the agent
ssh-add ~/.ssh/id_ed25519

# Copy the public key to add to GitHub
cat ~/.ssh/id_ed25519.pub

Go to GitHub Settings > SSH and GPG keys > New SSH key, paste your public key and save. You can now clone, push and pull using SSH URLs.

Core GitHub features

Repositories

A repository is a project on GitHub. It contains your code, configuration files, documentation and the complete Git history. Every repository has:

  • A code tab for browsing files
  • An issues tab for tracking work
  • A pull requests tab for code review
  • A wiki for documentation
  • A settings tab for access control

Create a new repository from the GitHub homepage or from the command line:

# Create a new repo on GitHub, then clone it
gh repo create my-project --public --clone

Issues

Issues are how you track work. Use them for bug reports, feature requests, tasks and discussions:

# Create an issue from the command line
gh issue create --title "Fix login bug" --body "Users cannot log in with empty email"

Each issue can have:

  • Labels — categorize by type (bug, enhancement, documentation)
  • Assignees — who is responsible
  • Milestones — group issues into releases or sprints
  • Linked pull requests — show which PRs close the issue

Pull requests

Pull requests are the heart of GitHub collaboration. They let you propose changes, review code and merge when ready:

# Create a branch, make changes, push, then open a PR
git checkout -b fix-login-bug
# make changes
git add .
git commit -m "Fix null check in login handler"
git push origin fix-login-bug
gh pr create --title "Fix login bug" --body "Adds null check for empty email"

Pull requests include code review tools, automated checks, discussion threads and merge controls. They are the standard way to get code into a shared codebase.

GitHub Actions

Actions automate your development workflow. Write YAML files that define what happens when events occur:

# .github/workflows/ci.yml
name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - run: npm ci
      - run: npm test

Common uses include running tests on every push, deploying to production on merge to main and building Docker images on release.

GitHub Pages

Host static websites directly from your repository:

# Enable Pages in your repo settings, then push to the gh-pages branch
git checkout -b gh-pages
git push origin gh-pages

Pages is perfect for documentation sites, portfolios, blogs and landing pages. It supports custom domains, HTTPS and static site generators like Jekyll and Astro.

Working with teams

Forking repositories

Forking creates your own copy of someone else’s repository. You can make changes without affecting the original:

# Fork a repo using the GitHub CLI
gh repo fork owner/repo --clone

# Or fork and add a remote
git remote add fork https://github.com/your-username/repo.git

Forking is the standard way to contribute to open source. You fork the repository, make changes in your fork and open a pull request back to the original.

Code review

GitHub’s code review tools let you comment on specific lines, suggest changes and request modifications:

  • Inline comments — discuss specific lines of code
  • Suggested changes — propose edits that authors can accept with one click
  • Review approvals — approve, request changes or comment on the overall PR
  • Code owners — automatically assign reviewers based on which files changed

Branch protection

Protect important branches from accidental or unauthorized changes:

  • Require pull request reviews before merging
  • Require status checks to pass (CI must be green)
  • Require linear history (no merge commits)
  • Restrict who can push to the branch
  • Require signed commits

Project management

GitHub Projects provides kanban boards, tables and roadmaps for managing work:

  • Create columns like “To Do”, “In Progress” and “Done”
  • Link issues and pull requests to cards
  • Automate card movement based on events
  • Track progress with insights and charts

Best practices

  • Write descriptive README files — explain what your project does, how to install it and how to contribute.
  • Use issue templates — standardize bug reports and feature requests.
  • Enable branch protection — require reviews and passing CI before merging.
  • Write meaningful PR descriptions — explain what changed, why and how to test it.
  • Use GitHub Actions — automate testing and deployment instead of doing it manually.
  • Keep repositories focused — one project per repo, not a monolith of unrelated code.
  • Tag releases — use semantic versioning and GitHub Releases to mark stable versions.
  • Contribute to open source — fork, fix, and submit pull requests to build experience and reputation.

Common mistakes

  • Pushing sensitive data like API keys or passwords to a public repository.
  • Not writing a README, leaving visitors confused about what the project does.
  • Creating pull requests with no description or context for reviewers.
  • Ignoring issues and letting them pile up without triage.
  • Not using branch protection, allowing direct pushes to main.
  • Committing node_modules, .env or other files that should be in .gitignore.
  • Using GitHub as a backup service without understanding Git locally first.

What to learn next

You now understand GitHub’s core features: repositories, issues, pull requests and Actions. From here the natural next step is Git for mastering the version control system underneath, including branching, merging and rebasing. Pick a project, contribute to it and let the practice compound.

Repository names

Use descriptive, kebab-case names that tell you what the project does.

Prefer
react-data-grid
task-api-server
design-system-tokens
Avoid
my-project
stuff
final-v2-actual

Issue titles

Write titles that describe the problem, not the solution attempt.

Prefer
Login form crashes on empty email input
Add pagination to user list endpoint
Dark mode toggle not persisting across sessions
Avoid
Bug
Fix this
Help please

FAQ

Frequently asked questions

Keep learning

Related topics from the roadmap.

$ start learning

Ready to start learning GitHub?

Our interactive tutorial walks you through GitHub step by step — with quizzes and real code you can run in the browser.