Cannot download non-default branch using Download ZIP

I have 2 questions about the Download ZIP feature under the green “Code” dropdown menu:

I have a public repo on github. I want it’s users to be able to download the repo without having git installed on their computer.

I instruct them to use the Download ZIP option. My questions are

a) I am seeing that the downloaded zip file is always of the default branch no matter what the actual branch is selected when you click Download ZIP. Wondering if that is the intended behavior or am I doing something wrong? The only way I am actually able to download a non-default branch using Download ZIP is by intuiting the url of the acutal file I want (by hovering over the option in the browser and substituting the branch in the url) then using a java program to download that url. Curious if there’s an option to do this through the website.

b) My repo contains a reference to a submodule. Is it possible to have the submodule be included in the zip file using the Download ZIP feature?

1 Like

a. I’m not seeing this behavior.
Certainly, the download zip link for:

is very different from the normal ones.

b. I doubt it. This seems like an expensive request for GitHub. You’re welcome to ask support for the feature, but I would expect them to decline.


Hello! :smiley:

This is a duplicate of

already filed on Sep 20th :wink: by @nithinjohn22

The behaviour prior to the manifestation of this bug was that the Code button would fetch an archive of the user-selected, non-default, repo branch, so yes, what you were expecting to happen WAS the intended behaviour…

Nothing wrong on your part :smiley: , the behaviour of the green Code button is currently broken :disappointed:

Related report is the one I filed 5 days ago:

AFAICT, this is a genuine bug (was working fine for many years, broke some time after Sep 15th…), but hasn’t yet been acknowledged as such by GitHub stafff… :angry:
Very frustrating, to say the least… :angry:
As yourself, I have to manually compose URIs that would download a ZIP archive of a non-default repo branch or of a specific repo snapshot, i.e. commit

Alas, being a “Free” user, it appears we’re not entitled to proper bug report via the Contact Form, nor expect an eventual fix in a timely fashion… Very diappointed currently…

I think this issue is fixed. It is working perfectly now. Thanks to everyone for reporting (especially @nithinjohn22), and thanks to GitHub for fixing this issue.

Thanks for all the useful replies. I just tested this again and it’s working now.

1 Like