How To Download From GitHub? [Beginners Guide]

Are you finding difficulties in downloading projects from this very known site – GitHub? You are at the right place, here we will tell you how to clone source codes and download from GitHub and use it in your local software.

As you head to GitHub’s main page which has all your code repositories and wants to download those source codes of your project into your local computer to use with other software then it becomes very complicated for those who have just started working with this site and don’t know how to download from GitHub. So, keep on reading and we will clear all your doubts. First of all, let’s have a glimpse on what is GitHub and Git?

What is Git And GitHub?

Git is the version control tech of choice for basically everybody right now, from developers. Whereas, GitHub is a place where you host your code repository/project. It is the social code-hosting platform that’s currently used more than any other. It’s a place where you can play and experiment. You can share your work/project with everyone and work together. It’s a place where you can find the most incredible open-source information, emerging technologies, features, and designs. It’s a place to learn different coding and experience new things.

What Is Git Bash?

Git Bash is the command prompt that you can use to interact between GitHub and your local copy of the code. You can clone a repository from GitHub to your local machine, make changes, put them back to GitHub for everyone else to consume. Thus, you require Git Bash for doing such things.

How Can You Download From GitHub?

Now, as you open your repository and when you click on one of the source codes, then the code opens up into another browser and you cannot download it from there as there’s no download button on the browser where GitHub takes you. And if you will right-click on that source code again, and select ‘save as’ option, then you will just end up having the HTML code and not the content you expected to have.

Therefore, the question remains, “How Can You Download Something From GitHub?”

We will tell you how to download from GitHub, it could be the source codes of any project or any other code. Just follow the given steps to download or clone the source codes of any project from GitHub:

Download As ZIP

Here, we will tell you the steps on how to from GitHub repository in a ZIP format. Follow the given steps:

1. Open GitHub and go directly to the main page of repositories, where you keep your projects or source codes.

2. Now the most simple way is to download your project as a ZIP. So, click on the ‘Download ZIP” option given on the topmost right corner as shown in the picture.

3. Now as you click on that option, a box will appear asking you where you want to save that file, so choose the location on your PC where you want that file to be located.

4. Now as you save it, unzip your file and extract the source code from it. You can use the WinRar software on your desktop to extract the files from your ZIP.

Download Using Git Bash

For this, you need to have Git Bash installed in your software before downloading something from GitHub. If you don’t know how to install Git Bash then first head to the topic where we have given the steps on how can you download Git Bash for your desktop, and then come back and follow these steps:

  1. Now, after installing Git Bash for your computer, open GitHub on your browser.
  2. Go to the main page of the repository where you have all your source codes or projects.
  3. Click on the green button i.e. “Clone or download” button.

4. And then copy the URL under ‘Clone with HTTPS’, click on the button which is alongside the URL and this way you can copy the URL.(look at the pictures for help)

5. Since, we have already installed Git Bash so click on the windows or start button and type ‘Git’ in your search bar.

6. Now click on Git Bash which is the command line which we will be using for accessing Git.

7. Change the current working directly to the location where you want to insert the cloned directory.

8. Then type git clone, and then paste the URL that you copied earlier from GitHub.

For eg:  $ git clone https://github.com/YOUR-USERNAME/YOUR-REPOSITORY

9. Press enter to create your local clone.

This way, you can use that code on your local desktop using your software which you like and make changes as you want.

How To Download Git Bash On Windows?

Under this, we will tell you the steps in detail for how you can download Git Bash on your Windows:

  1. Visit the official git bash website, and then click the ‘Download for Windows’ button and the download will start automatically.
  2. Now run the Installer, once you have downloaded Git Bash executable and click on “Next” after reading the license.
  3. A new page will open asking you for the location where you want Git Bash to be installed, we will suggest you to let it be on default and click “Next”.
  4. Click the components you want to install and click “Next”.
  5. A new page will appear where you can change the name of the start menu folder or just leave it to default and click on “Next”.
  6. In another step, you have to select the default editor that you want for Git to use, you should choose Notepad++ or Nano and then click on “Next”.
  7. Now, choose the option you want depending on where you want to use Git, thus we would recommend you to choose “Use Git and optional Unix tools from the Command Prompt” option, this will allow you to use both Git and Bash commands on Windows Command Prompt.
  8. Next, select “use the Open SSL library” and click on “Next”.
  9. For the next page, you will have to select how Git should treat line endings in files, so go with the default chosen option and click “Next”.
  10. Proceed with the next default selected option of Terminal Emulator and click “Next”.
  11. Again, click on “Next” for the next page with default options.
  12. Now on the next and the last step click on “Install”.

Now, You just have to wait for the Installation, and this way you can use the Git Bash for your source codes on your desktop.

Conclusion

We hope we have covered all the ways, and provided you with every possible method of how to download from GitHub, and also how you can install Git Bash. We have given all the trusted information, which you can use to easily access your codes and use them as your local clone.

Leave a Reply