Welcome to GitHub How-To’s documentation!
Download files from a GitHub repository
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 to your own (local) computer.
Clone a repository to your local computer using Git.
Fork a repository to create a new repository on GitHub.
Browse the repository’s directories and download only specific files.
From the GitHub Documentation : Downloading files from GitHub.
Download the repository
This is the easiest way to obtain the most up-to-date source code.
To download a repository, you need to follow these steps:
Navigate to the main page of the repository you want to clone.
Above the list of files, click
.Click
Change the current working directory to the location where you want to download the repository ZIP file.
Go into your file browser and go to the selected directory for this repository.
Unzip the archive file.
Clone the repository
This is the best way to obtain the most up-to-date source code. However, you need to be familiar with the use of Git and a client software able to manage git repository must be installed (such as Git Bash or GitHub Desktop…).
To clone a repository, you need to follow these steps:
Navigate to the main page of the repository you want to clone.
Above the list of files, click
.Copy the URL for the repository in the corresponding HTTPS Clone sub-section.
Open Git Bash (or another git management software).
Change the current working directory to the location where you want the cloned directory.
Type git clone, and then paste the URL you copied earlier.
git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY
Press Enter to create your local clone.
Go into your file browser and go to the selected directory for this repository.
From the GitHub Documentation : Cloning a repository.
Download specific files
The most boring way to obtain files in a GitHub repository is to browse in the different directories and to manually download each file you need.
To download specific files from a repository, you need to follow these steps:
Navigate to the main page of the repository you want to clone.
Browse through the different directories.
Open a file and click
icon.Change the current working directory to the location where you want to download the raw file.