How to download from Github

I was trying to update my Mega 2560 device driver firmware using the DFU programming method as outlined in "http://arduino.cc/en/Hacking/DFUProgramming8U2".

To download the update, it sent me to "Github". Well, I am not familiar with Github an how Github works.

Can someone explain to me how to download a file from Github? In the repository, I selected the atMegaxxU2 directory and I found the "Readme.txt" and "MEGA-dfu_and_usbserial_combined.hex" file I need to download.

I do not know though how to actually download the file as instructed by the instruction.

You have a number of options.


The simplest and quickest is to just download each file (providing there are not too many of them).

Click on the link for the wanted filename until you see its contents. On the right should be Raw / Blame / History buttons.

RH-click on Raw and then "Save link as" a suitable location on your hard disk. Repeat for any other wanted files.


You can also go to the "root" of the repository ( https://github.com/arduino/Arduino ) where you will find a "Download Zip" button on the right. However this downloads the entire repository, this could take quite a while.


You could install "git" and clone the respository. This also gives you a copy but also all changes, which would be even bigger.


You can install "subversion" and download a folder. Assuming you have subversion installed this command pulled in for me the files in the "/hardware/arduino/firmwares/atmegaxxu2" folder:

svn export https://github.com/arduino/Arduino/trunk/hardware/arduino/firmwares/atmegaxxu2

I don't have anything to add to Nick's explanation, but I'll simplify: 1) If you want a single file, navigate to it and use the "raw" button (may involve "right clicking" and "save as") 2) If you want the whole directory tree, but are not doing "development", use the "Download Zip" button on the project's top-level page. 3) If you are doing development, install git and "clone" the repository.