[git] How to download source in ZIP format from GitHub?

I see something strange like:

http://github.com/zoul/Finch.git

Now I'm not that CVS, SVN, etc. dude. When I open that in the browser it tells me that I did something wrong. So I bet I need some hacker-style tool? Some client?

(I mean... why not just provide a ZIP file? Isn't the world complex enough?)

This question is related to git github

The answer is


As of June 2016, the Download ZIP button is still under the <> Code tab, however it is now inside a button with two options clone or download:

Symfony image example


Here's a good reference if you want to do it from the command line: http://linuxprograms.wordpress.com/2010/10/26/checkout-code-from-github/

Basically it's

git clone http://github.com/zoul/Finch.git

Even though this is fairly an old question, I have my 2 cents to share.

You can download the repo as tar.gz as well

Like the zipball link pointed by various answers here, There is a tarball link as well which downloads the content of the git repository in tar.gz format.

curl -L http://github.com/zoul/Finch/tarball/master/

A better way

Git also provides a different URL pattern where you can simply append the type of file you want to download at the end of url. This way is better if you want to process these urls in a batch or bash script.

curl -L http://github.com/zoul/Finch/archive/master.zip

curl -L http://github.com/zoul/Finch/archive/master.tar.gz

To download a specific commit or branch

Replace master with the commit-hash or the branch-name in the above urls like below.

curl -L http://github.com/zoul/Finch/archive/cfeb671ac55f6b1aba6ed28b9bc9b246e0e.zip    
curl -L http://github.com/zoul/Finch/archive/cfeb671ac55f6b1aba6ed28b9bc9b246e0e.tar.gz

curl -L http://github.com/zoul/Finch/archive/your-branch-name.zip
curl -L http://github.com/zoul/Finch/archive/your-branch-name.tar.gz

Sometimes if the 'Download ZIP' button is not available, you can click on 'Raw' and the file should download to your system.


I've been stumped by this too. The "Download" button is to the far right, but you also need to be in the top folder in order to download what you're seeing. Go up as high as you can to the parent/root folder and then look for the download button.


You can also publish a version release on Github, and there's an option to download the source code of that release in a zip file.

You can then share the zip file link to anyone to download the project source code.


In chrome, if you hover your cursor on Download ZIP it will give you the link at the bottom of the browser

enter image description here


Updated July 2016

As of July 2016, the Download ZIP button has moved under Clone or download to extreme-right of header under the Code tab:

Download ZIP (2013)


If you don't see the button:

  • Make sure you've selected <> Code tab from right side navigation menu, or
  • Repo may not have a zip prepared. Add /archive/master.zip to the end of the repository URL and to generate a zipfile of the master branch:

http://github.com/user/repository/ -to-> http://github.com/user/repository/archive/master.zip

to get the master branch source code in a zip file. You can do the same with tags and branch names, by replacing master in the URL above with the name of the branch or tag.


To download your repository as zip file via curl:

curl -L -o master.zip http://github.com/zoul/Finch/zipball/master/

If your repository is private:

curl -u 'username' -L -o master.zip http://github.com/zoul/Finch/zipball/master/

Source: Github Help


What happens when the repository owner has not prepared a zip file, and you just want a download to use yourself? There is an answer and you don't need to go though that horrid process to download software, install and register keys and whatnot on GitHub, etc.!

To simply download a repository as a zip file: add the extra path '/zipball/master/' to the end of the repository URL and voila, it gives you a zip file of the whole lot.

For example,

http://github.com/zoul/Finch/

becomes:

http://github.com/zoul/Finch/zipball/master/

It then gives you a zip file to download.


I was facing same problem but accidentlty I sorted this problem. 1) Login in github 2) Click on Fork Button at Top Right. 3) After above step you can see Clone or download in Green color under <> Code Tab.


As of December 2016, the Clone or download button is still under the <> Code tab, however it is now to the far right of the header:

Github Clone or download screenshot


For people using Windows and struggling to download repo as zip from terminal:

url -L http://github.com/GorvGoyl/Notion-Boost-browser-extension/archive/master.zip --output master.zip