There is a GitHub repository that I would like to download as a zip file. However, some of the code I want to download is located in separate repositories and only a link to those repositories are located in the main repository, not the actual code. If I want a zip file containing the whole codebase, do I need to download the separate repositories and assemble it, or is there a way to do it?
Asked
Active
Viewed 72 times
1 Answers
0
Not directly from GitHub: the tarball or archive representing a repo does not include its submodules, assuming the repo has a .gitmodules
file.
Only a git clone --recursive
(maybe with --depth=1
) would get you a complete content.
Note: if the repo does not have a .gitmodules
file, those references are just gitlinks to other repo SHA1, without their URL, in which case even a regular clone would not get their content.
If I want a zip file containing the whole codebase, do I need to download the separate repositories and assemble it?
Yes, ... except you might end up with the wrong content: the main parent repo does reference other repos specific SHA1, so you need to make sure to query an archive for the right reference.