# A developer's introduction to GitHub

> A developer's introduction to GitHub: repositories, issues, branches, pull requests, Actions, Projects, releases, integrations, and account security.

Author: [Flavio Copes](https://flaviocopes.com/about/) | Published: 2018-02-16 | Updated: 2026-07-18 | Topics: [Git](https://flaviocopes.com/tags/git/) | Canonical: https://flaviocopes.com/github/

GitHub is a platform for hosting Git repositories and collaborating on software.

Git does the version control work on your computer. GitHub stores a remote copy of the repository and adds tools for discussing, reviewing, automating, and publishing the work.

You do not need GitHub to use Git, but GitHub is often where a team shares its Git repository.

## Repositories

A GitHub repository contains your files and their Git history. It can be public or private and can belong to a person or an organization.

A repository can also contain:

- a README that introduces the project
- issues for bugs and tasks
- pull requests for proposed changes
- discussions for questions and announcements
- releases for downloadable versions
- automated workflows

GitHub's [repository documentation](https://docs.github.com/en/repositories/creating-and-managing-repositories/about-repositories) explains the terminology and visibility options.

To get a repository onto your computer, clone it:

```bash
git clone https://github.com/OWNER/REPOSITORY.git
```

If you use SSH with GitHub, use the SSH URL instead:

```bash
git clone git@github.com:OWNER/REPOSITORY.git
```

## Branches and forks

A branch is a separate line of work inside a repository. You normally create a branch, make commits, push it to GitHub, and open a pull request.

```bash
git switch -c add-search
git add .
git commit -m "Add search"
git push -u origin add-search
```

A fork is a separate repository connected to an upstream repository. Forks are useful when you want to contribute to a project but do not have permission to create branches in its repository.

Team members with write access usually work from branches in the shared repository. External contributors often work from forks. Both approaches can lead to a pull request.

## Issues

Issues track bugs, tasks, ideas, and user feedback.

An issue can have labels, assignees, milestones, sub-issues, and dependency relationships. A pull request can also close an issue automatically when its description includes a supported keyword such as:

```text
Closes #42
```

Use an issue when the work needs discussion or tracking. Use a discussion when the conversation is more open-ended and does not yet represent a concrete task.

See GitHub's [guide to issues](https://docs.github.com/en/issues/tracking-your-work-with-issues/learning-about-issues/about-issues).

## Pull requests

A pull request proposes merging changes from one branch into another.

It shows the commits and file differences, and gives collaborators one place to:

- discuss the change
- comment on specific lines
- suggest edits
- approve the change or request changes
- inspect automated checks
- merge the branch

A pull request is not limited to forks. It can compare two branches in the same repository, which is the common workflow for a team with write access.

Draft pull requests are useful when you want early feedback but the change is not ready to merge. GitHub's [pull request documentation](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) covers both regular and draft pull requests.

## GitHub Actions

GitHub Actions runs automated workflows in response to repository events.

A workflow is a YAML file in `.github/workflows/`. It can run tests when a pull request opens, build a site after a push, publish a package, or deploy a release.

Here is a small workflow that installs dependencies and runs tests:

```yaml
name: Test

on:
  pull_request:
  push:

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: actions/setup-node@v6
        with:
          node-version: lts/*
          cache: npm
      - run: npm ci
      - run: npm test
```

Actions referenced with `uses:` execute code in your workflow. Review third-party actions before using them and pin them according to your project's security policy.

Start with GitHub's [workflow documentation](https://docs.github.com/en/actions/concepts/workflows-and-actions/workflows).

## GitHub Projects

GitHub Projects helps you plan and track work across issues and pull requests.

A project can display the same work as a table, board, or roadmap. You can add custom fields, filters, charts, automation, and draft items. Projects can belong to a user or an organization and are not limited to a single repository.

See [About Projects](https://docs.github.com/en/issues/planning-and-tracking-with-projects/learning-about-projects/about-projects) for the current feature set.

## Releases

A Git tag marks a point in the repository history. A GitHub release adds a page around a tag with release notes and optional downloadable files.

Releases are useful for publishing application builds, command-line binaries, or source archives. You can create them in the web interface, with GitHub CLI, through the API, or from an automated workflow.

Read GitHub's [release documentation](https://docs.github.com/en/repositories/releasing-projects-on-github/about-releases).

## Webhooks and GitHub Apps

Webhooks send an HTTP request to another service when an event happens, such as a push, issue update, or release.

Use a webhook when an external system only needs event notifications. Use a GitHub App when an integration needs to authenticate, request narrowly scoped permissions, and act on GitHub data.

GitHub recommends GitHub Apps over OAuth apps for many organization-wide integrations because their permissions can be more precise. See the documentation for [webhooks](https://docs.github.com/en/webhooks/about-webhooks) and [GitHub Apps](https://docs.github.com/en/apps/overview).

## Keep your account secure

Enable two-factor authentication or use a passkey, and save your recovery codes somewhere safe.

For command-line Git access, use SSH or HTTPS with GitHub CLI, a credential manager, or a personal access token. GitHub no longer accepts your account password for Git operations over HTTPS.

Give tokens the smallest permissions they need, set an expiration when possible, and never commit tokens or private keys to a repository.

GitHub's [authentication guide](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/about-authentication-to-github) describes the supported methods.
