Skip to main content

Enterprise Server 3.23 is currently available as a release candidate.

Skip to content

Downloading files from GitHub

Learn how to download files from GitHub, and understand the difference between downloading, cloning, and forking.

Introduction

There are different ways to get a copy of a repository's files on GitHub. You can:

  • Download a snapshot of a repository's files as a zip file, a single file, or a release asset to your own (local) computer.
  • Clone a repository to your local computer using Git.
  • Fork a repository to create a new repository on GitHub.

Each of these methods has its own use case, which we'll explain in the next section.

This article focuses on downloading files to your local computer. For example, if you've found some interesting content in a repository on GitHub, downloading is a simple way to get a copy of the content, without using Git or applying version control.

Choose the section that matches what you want to download:

Understanding the differences between downloading, cloning, and forking

TermDefinitionUse case
DownloadTo save a snapshot of a repository's files to your local computer.You want to use or customize the content of the files, but you're not interested in applying version control.
CloneTo make a full copy of a repository's data, including all versions of every file and folder.You want to work on a full copy of the repository on your local computer, using Git to track and manage your changes. You likely intend to sync these locally-made changes with the GitHub-hosted repository. For more information, see Cloning a repository.
ForkTo create a new repository on GitHub, linked to your personal account, that shares code and visibility settings with the original ("upstream") repository.You want to use the original repository's data as a basis for your own project on GitHub. Or, you want to use the fork to propose changes to the original ("upstream") repository. After forking the repository, you still might want to clone the repository, so that you can work on the changes on your local computer. For more information, see Fork a repository.

Downloading a repository's files

For the tutorial, we'll use a demo repository (octocat/Spoon-Knife).

  1. Navigate to octocat/Spoon-Knife.

  2. Above the list of files, click Code.

    Screenshot of the list of files on the landing page of a repository. The "Code" button is highlighted with a dark orange outline.

  3. Click Download ZIP.

You now have a copy of the repository's files saved as a zip file on your local computer. You can edit and customize the files for your own purposes.

Downloading a single file

If you only need one file, you can download it without downloading the rest of the repository.

  1. On GitHub, navigate to the main page of the repository.
  2. In the list of files, click the file you want to download.
  3. In the upper-right corner of the file view, click .

Downloading release assets

Many projects publish applications, installers, and other files as assets on a release. If a project's README tells you to download the latest version of its software, look for it on the project's releases page.

If you don't see Releases, check the repository's README for download or installation instructions.

  1. On GitHub, navigate to the main page of the repository.

  2. To the right of the list of files, click Releases.

    Screenshot of the main page of a repository. A link, labeled "Releases", is highlighted with an orange outline.

  3. Find the release you want to download. The most recent release is usually at the top of the page.

  4. Scroll down to the "Assets" section of the release. If the section is collapsed, click Assets to expand it.

  5. Click the name of the file you want to download.

If a release only includes Source code (zip) and Source code (tar.gz) files, the project hasn't attached any other assets to the release. For more information about source code files, see Downloading source code archives.