How to download files from GitHub

Downloading files from GitHub is extremely simple, although not many people are clear about it. Most repositories are public and downloading the code is too easy. Obviously, some of these repositories are not, generally they are the ones used by different companies that do not want their code to be seen.

Download a file from GitHub

The vast majority of public repositories can be downloaded completely free of charge, even without having an account. This is possible because public repositories are considered open source . Therefore, unless the owner of the code decides, the base code can be downloaded to our computer, compressed as a .zip file.

 

So let’s pretend we’re going to download this tip calculator from GitHub. As it is open source, it is possible to download it without problems. All we will have to do is enter the website and in the upper right corner of the screen we will see a green button that says “Code”, we will simply have to click on that button.

Once we click, we can see a drop-down menu. Here we will have to click on “Download ZIP” or “Donwload ZIP”.

When we do this, a Windows file explorer window will automatically open so that we can find where we want to save the zip file . Once it is downloaded, we are going to find it where we save it and we will right click to display the contextual menu, among all those options the one we are going to select is the one that says “Extract all” or “Unzip here”. Then we will have to select a folder where we want the files to be saved.

To finish, we are simply going to have to go to the folder where all these files are and that’s it.

Clone files using commands

Another option that we can learn is how to download or clone files from GitHub in a simple way using commands. For this you need to install the Git tools. We are going to proceed with the file that we leave you a little above to serve as an example.

 

We will have to click on the “Clone” button on the GitHub page and then copy the URL that appears in the context menu.

After this we will have to open Git Bash and write “cd Downloads” without the quotes, we press Enter. This will take us to the downloads folder, obviously we can write any other location changing “Downloads” by its name.

Now we are simply going to put “git clone URL” where we put URL should go the address we copied earlier, then we press Enter.

With this simple method we can also download the files and they are even decompressed automatically.

 

 

Infozonex is a blog/website that is all about information, we called it LOG OF WEB INFO.

Leave a Comment