How Do I Download A File From Github

If yous've always used GitHub before, you lot know that it's not immediately clear on how to download files from the platform. It'southward one of the more complicated platform, as it isn't directly meant for direct file sharing, but for development instead. Granted, one of the big things about GitHub is that all of the public repositories are open source, and people are encouraged to contribute — there are individual repositories, but these are generally used for evolution purposes inside businesses that don't desire their code seen by the public. GitHub, all the same, still handles downloading files differently than other places.

How To Download Files From GitHub

So if yous're not entirely certain how you can download files from projects (or entire projects) from GitHub, nosotros're going to evidence you how. Let'southward get started.

Downloading a File From GitHub

About public repositories tin can be downloaded for free, without fifty-fifty a user business relationship. This is because public repositories are considered to be codebases that are open source. That said, unless the owner of the codebase checks a box otherwise, their codebase can be downloaded onto your calculator, packed into a .zip file.

  1. So, if you get to a public codebase — such as this Tip Reckoner that I built — you'll notice that in the pinnacle-right corner is a green button that says Clone or Download, click on the button.
  2. Then, in the dropdown, select Download Zero. All of the files volition begin downloading to your estimator, ordinarily in your Downloads folder. GitHub Repo 2
  3. So, open your Downloads folder on your calculator and find the Cypher file. You lot'll desire to right-click it and cull the option that says Extract All…, Unzip, or Uncompress, and then select a folder where yous want the files to stop upwards. File settings
  4. Finally, navigate to that selected binder, and you lot'll find all of those Github files that we downloaded right there!

That'south a fairly modest codebase, with only a couple of files in it. If y'all go to Wes Bos' JavaScript 30 repository on Github, y'all'll discover that — since it is a public repository — it can be downloaded the same fashion.

Downloading GitHub Files Using Commands

Alternatively, you can easily clone a file or repository using a few simple commands on GitHub. For this to work, y'all'll need to install the Git tools. We're going to be installing the same tip calculator from the command line in this demo.

  1. Copy the URL from your address bar or from the same carte du jour where you downloaded the nada file from. GitHub Repo
  2. Open upward Git Bash, type in "cd Downloads" and hit Enter. This will take you to the Downloads folder in the command window, y'all tin also type whatsoever file location you want to save the file in. command prompt
  3. At present, type in "git clone https://github.com/bdward16/tip-calculator.git"and striking Enter.command prompt 2
  4. Using this method, the files are automatically unzipped when downloaded.

There'south a Better Fashion to Download Files

While the manner we outlined is simple and straightforward, it's nearly optimal for simply viewing the lawmaking files, non experimenting. If you're planning on downloading GitHub files to experiment with, the best way would be to "fork" the projection. A fork is only your own copy of a repository.

Forking a repository comes with a number of benefits. It gives you your own re-create on your GitHub account that allows you to freely experiment with changes without affecting the original project. For example, you could discover a bug in my Tip Calculator or desire to add your ain features. So, you lot could "fork" my Tip Reckoner, creating a copy on your GitHub account. Here, you lot could mess around the code and experiment with it without affecting the original project, because this would be your copy or "fork."

Nigh commonly, forks are used to either propose changes to someone else's project, like fixing a bug or calculation a feature as we mentioned.

So, how do you fork a public repository? It'southward really quite like shooting fish in a barrel. Earlier we get started, you lot need to create a gratis GitHub account, as yous'll need somewhere to store your fork. Y'all tin can head to www.github.com and practice this right now.

Once you lot have your account created, y'all can fork a public repository to your account.

  1. For example, you tin can caput over to the public repository for Wes Bos' xxx Days of JavaScript grooming grade, and in the meridian-right corner, you'll see a button that says Fork. Click the button.
  2. It could take a couple of seconds to a few minutes, but GitHub volition then clone or "fork" that project over to your own GitHub account. One time it's done, it'll immediately show you the project nether your GitHub username.
  3. To verify, you can click on your profile icon in the navigation bar at the top-right, and and so select the option that says Your Repositories . In your list of repositories, yous should see the JavaScript 30 grade codebase.

Now, yous tin change and experiment with the code all you want, and it won't affect the original project files of the original owner. If you change some code, set up a bug, or add a new characteristic, yous can create something called a "Pull Request," where that change can be discussed. If the original project owner likes the change — and it works properly — it can exist merged into the original codebase as production code.

Endmost

As you lot tin can see, downloading files and whole projects from GitHub is actually quite piece of cake. In just a couple of minutes, you can have an entire project downloaded onto your calculator, or fifty-fifty forked to your own GitHub business relationship. It doesn't take much to mess around with the code in your fork to run across what affects what, and then eventually, yous might fifty-fifty be able to create your get-go pull request! Happy coding!

DOWNLOAD HERE

Posted by: weeksging1938.blogspot.com