Skip to content

GitHub

GitHub is a cloud platform that hosts Git repositories and wraps them in collaboration tooling like pull requests, issue tracking, and continuous integration. Owned by Microsoft since 2018, it hosts much of the Python ecosystem, including the CPython source code and the PEPs that shape the language. The pull request is where most of that collaboration tooling comes together:

A branch pushed from a local clone opens a pull request, which merges into main only after review approval and passing Actions checks.
What GitHub Wraps Around a Git Repository

GitHub isn’t the only place to host a Git repository. GitLab and Bitbucket offer comparable pull request and continuous integration features, while Codeberg, Gitea, and Forgejo are community-governed or self-hosted alternatives.

Installation and Setup

The platform itself needs no installation. A free account at github.com covers unlimited public and private repositories, plus Actions minutes and Codespaces hours for personal use.

The official GitHub CLI, gh, handles the same workflows from a terminal:

Language: Windows PowerShell
PS> winget install --id GitHub.cli --source winget
PS> gh auth login
Language: Shell
$ sudo apt-get update && sudo apt-get install -y gh
$ gh auth login
Language: Shell
$ brew install gh
$ gh auth login

The login flow stores a token in the system credential store and offers to register gh as a Git credential helper, which keeps pushes to private repositories from prompting for a password. Other install routes, including GitHub’s own apt and dnf repositories, are listed at cli.github.com.

Key Features

  • Hosted Git remotes with unlimited public and private repositories on the free plan.
  • Pull requests carrying inline review comments, required approvals, and status checks.
  • Issues, labels, milestones, and Projects boards for planning work.
  • GitHub Actions for running test suites and publishing packages on every push.
  • GitHub Pages for serving project documentation straight out of a repository.
  • REST and GraphQL APIs, plus the gh CLI, for scripting the whole platform.

Usage

Publish a local Python project as a new repository:

Language: Shell
$ gh repo create my-package --public --source=. --push

Open a pull request from the current branch, then watch its checks finish:

Language: Shell
$ gh pr create --fill
$ gh pr checks --watch

Run the test suite on every push by committing a GitHub Actions workflow file:

Language: YAML Filename: .github/workflows/tests.yml
name: Tests
on: [push]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: actions/setup-python@v7
        with:
          python-version: "3.14"
      - run: python -m pip install pytest
      - run: python -m pytest

Triage open issues or check out a teammate’s branch without leaving the terminal:

Language: Shell
$ gh issue list --assignee @me
$ gh pr checkout 42
How to Use GitHub

Tutorial

How to Use GitHub

Learn how to use GitHub step by step to create a remote repository, push your local Python project, and collaborate with others using GitHub Issues.

basics tools

For additional information on related topics, take a look at the following resources:


By Martin Breuss • Updated Sept. 1, 2026