Reputation: 1426
I want to download this source file in the zip here:
https://github.com/xdtianyu/android-4.2_r1/tree/master/packages/apps/SoundRecorder
But there is no Zip Download
button. There is a Zip Download
button in the root directory of the repository:
https://github.com/xdtianyu/android-4.2_r1
But I don't want to download the whole repository. How can I download that single project (specific subdirectory)?
I read this topic but still, I can't Download source as the zip file:
Download single files from GitHub
How to download source in ZIP format from GitHub?
Upvotes: 24
Views: 62917
Reputation: 22196
Use DownGit; you can download individual files or directories, and even create download-link for them-
You can also configure properties of the download-file. See here for detailed usage.
Disclaimer: I fell into the same problem as the question-asker, could not find any proper solution, so I created this tool for my own use, and later made it available for everyone.
Upvotes: 27
Reputation: 137139
You can't download a subdirectory from GitHub as a zip file.
Some options are to
git
with sparse checkouts instead of downloading as a zip file.
.git
directory, but your working copy will only contain the files and directories that you want.For more information on sparse checkouts have a look at this answer.
Upvotes: 32