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?
When you view individual files on GitHub, you'll notice the button to download the code isn't there. You'll instead see the download button on the right side of the page when you navigate to the root of the repository.
When downloading materials to your laptop, it is easiest to download the entire repository. To do this, go to the GitHub page for the workshop, click on the green Code button, then download the repository as a ZIP file. The filename may be different than what's in the picture. Find the downloaded .
To download from GitHub, you should navigate to the top level of the project (SDN in this case) and then a green "Code" download button will be visible on the right. Choose the Download ZIP option from the Code pull-down menu. That ZIP file will contain the entire repository content, including the area you wanted.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With