You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When possible (accessibility-wise), would be nice if submodules are packed in the zip archive of branch.
For example:
# in Windows PowerShell
cd /temp
wget https://github.com/Snaipe/Criterion/archive/bleeding.zip -OutFile criterion-bleeding.zip
Expand-Archive criterion-bleeding.zip -DestinationPath .
# now compare
ls -r criterion-bleeding/dependencies
# with
cat criterion-bleeding/.gitmodules
tells us Criterion has three submodules listed in .gitmodules file which were not included in the zip archive.
Including submodules in releases would also be nice.
Reacted by Philipp D. Rohde, Peter Ped Helcmanovsky, Vitaliy Novichkov, Chris Lenk, andry81, Simon Stone, Fadi Alzammar, Haijun.Leng, VERNOU Cédric, glechapelain and 6 more
Big +1 from me! Submodules are cumbersome as it is, but the fact that they're not included in the zip makes it impossible to use submodules in a project you want to distribute via unadorned source downloads on GitHub.
Reacted by norlesh, Philipp D. Rohde, NOT_A_ROBOT, Richard Muvirimi, Tim Hutt, Simon Stone, Ben Fulcher, Shaun Roselt, Mark and Rakka Rage
Currently zip/tarballs are generated using git-archive, which does not include submodules. If the git team adds that functionality to git-archive, we’ll be sure to update it so we can include submodules as well.
Looking at the git-documentation does not show me something about support of submodules...
The issue is also related to: the referenced modules are revisions-pinned (different branches could have different submodules and/or could address different commits within); they could be recursive (have submodules too), etc.
Has this been solved? It would be awesome to have the submodules in the ZIP downloads and releases:(
Reacted by Caleb Mazalevskis, ░▒▓█│【Walkman】│█▓▒░, Lanyi, Marco Buttarini, jaybabani, Michał Walenciak, Soichi Hayashi, innernull, andry81, Simon Stone and 2 more
This is probably something for upstream, I.e. git. About pinning etc, simples would be to effectively do git submodule update —init —recursive, which is the first thing I do in any of my repos
Sure, but many people come to GIT just for the software, and dont know what
git is. The 'Download ZIP' button, therefore defeats its purpose.
Anyways, this is truly for Git to solve.
Reacted by jaybabani, Jerome Caillet, pulsartronic, norlesh, James E. A., Ivan Pogrebnyak, Peer de Bakker, Kevin John Mulligan, Philipp D. Rohde, Guntitat Sawadwuthikul and 6 more
Not only is this "nice to have", it's actually quite a support nightmare for me on all of my projects with submodules. I get regular complaints, no matter how many times I post DO NOT USE THE GITHUB SOURCE ZIP FILES.
Reacted by Michał Walenciak, Vick Mena, Nikolai Wuttke-Hohendorf, Peer de Bakker, Kevin John Mulligan, 12, Chris Lenk, Tim Hutt, Simon Stone, Mark and 3 more
Requiring end users of the repositories to learn the intricacies of git and rebuild the project structure in order to casually test a project because Github couldn't be chuffed customizing some code instead of just wrapping git-archive is BAULKED
Reacted by TheTechRobo, blumlaut, Nikolai Wuttke-Hohendorf, Rakka Rage, Philipp D. Rohde, XDobson, Chance Cardona, Brandon Bennett and Attila Nagy
To be honest, git submodules are one of the worst nightmares for linux distribution package maintainers.
People should use plain old libraries instead of git submodules.
Reacted by VVD, hypevhs and Claudia Pellegrino
Reacted by Phillip Johnston, Isaias Baez, h-vetinari, Sam Hocevar, Nikolai Wuttke-Hohendorf, wsor4035 and Willy
To be honest, git submodules are one of the worst nightmares for linux distribution package maintainers.
People should use plain old libraries instead of git submodules.
Though I myself am on this page because of a package I'm maintaining, submodules can still be useful. Especially on non-Linux systems, where the library system is abysmal. But even on Linux, for header-only libraries or similar things, submodules are fine.
Anyway, having source archives include submodules is logical. Anyone who wants the source code to a project should have all the necessary pieces to build it. If there are concerns as to file sizes, there could be radio buttons to choose whether to recursively include submodules. These buttons could simply add or remove an option in the URL to the archive. This would be enough for package maintainers, as they could use the URL for recursive submodule cloning.
Reacted by Michał Walenciak, Karol Woźniak, h-vetinari, Nikolai Wuttke-Hohendorf and Ingo Wald
I think people should contribute to projects like gitea instead of begging microsoft for a functionality.
Big tech doesn't listen to people. It's also a good idea to move your repositories out of github.
Reacted by John Leuenhagen, Owen Shepherd, Joseph Judge, andry81, VVD and cves-judgejoseph
I understand why including submodules in the generated ZIP could be problematic. On the other hand, source in the ZIP without submodule sources is of little use, and as noted above, just confuses many people.
What I do not understand is why GitHub does not at least show a loud and clear warning before downloading a ZIP for a repository with submodules.
Was there an official GitHub concrete response to this problem, I could not find any and this Issue has been open for over 5 years?
Reacted by Peer de Bakker, ahalekelly, Marcin Siniarski, Javier Martinez, Philipp D. Rohde, 12, Peter Ped Helcmanovsky, Guillaume Claret, Nick, rigwild and 16 more
I just want to notice that the git submodules does not support several git features as a builtin like sparse checkout or sparse recursion additionally to recursion flag in a command. You still must rely on some external tool and storage, for example, like vcstool to use alternative (and much more advanced) variant of external dependencies to checkout them. This brings alternative custom .submodules file and requires to supersede the clone command.
So as a result the archive command can not take out submodules correctly (no sparse support) and it's implementation actually never would be enough complete and applicaible.
Currently the vcstool project does not have a sparse checkout implemented, but it's fork has:
So as a result the archive command can not take out submodules correctly (no sparse support) and it's implementation actually never would be enough complete and applicaible
That all is mostly irrelevant by simplest downloading of archive for some branch on GH. But also if it it would be relevant for 0.01% of all cases, it'd work for 99.99% where a submodules must be included to archive one-to-one, without to take care about that "several git features".
At the moment it simply doesn't work for 100% of all repos with submodules.
Activity
rschuetzler commentedon Nov 2, 2017
Including submodules in releases would also be nice.
maddanio commentedon Mar 20, 2018
Any chance? :)
obskyr commentedon Jan 30, 2019
Big +1 from me! Submodules are cumbersome as it is, but the fact that they're not included in the zip makes it impossible to use submodules in a project you want to distribute via unadorned source downloads on GitHub.
sebres commentedon Jan 30, 2019
Alleged answer of the github about the subject (posted in https://blogs.harvard.edu/acts/2012/10/18/github-zip-doesnt-include-submodules/#comment-975):
Looking at the git-documentation does not show me something about support of submodules...
The issue is also related to: the referenced modules are revisions-pinned (different branches could have different submodules and/or could address different commits within); they could be recursive (have submodules too), etc.
gergelytakacs commentedon Apr 28, 2019
Has this been solved? It would be awesome to have the submodules in the ZIP downloads and releases:(
maddanio commentedon Apr 28, 2019
This is probably something for upstream, I.e. git. About pinning etc, simples would be to effectively do git submodule update —init —recursive, which is the first thing I do in any of my repos
gergelytakacs commentedon Apr 29, 2019
tadeu commentedon Oct 3, 2019
There is a third-party alternative that will archive all submodules together: https://github.com/Kentzo/git-archive-all
syedmohsinbukhari commentedon Dec 1, 2019
This would be super cool
bugfix: remove submodule
bugfix: remove submodule
phillipjohnston commentedon Sep 17, 2020
Not only is this "nice to have", it's actually quite a support nightmare for me on all of my projects with submodules. I get regular complaints, no matter how many times I post DO NOT USE THE GITHUB SOURCE ZIP FILES.
norlesh commentedon Nov 9, 2020
Requiring end users of the repositories to learn the intricacies of git and rebuild the project structure in order to casually test a project because Github couldn't be chuffed customizing some code instead of just wrapping git-archive is BAULKED
crocket commentedon Mar 16, 2021
To be honest, git submodules are one of the worst nightmares for linux distribution package maintainers.
People should use plain old libraries instead of git submodules.
ZLima12 commentedon May 1, 2021
Though I myself am on this page because of a package I'm maintaining, submodules can still be useful. Especially on non-Linux systems, where the library system is abysmal. But even on Linux, for header-only libraries or similar things, submodules are fine.
Anyway, having source archives include submodules is logical. Anyone who wants the source code to a project should have all the necessary pieces to build it. If there are concerns as to file sizes, there could be radio buttons to choose whether to recursively include submodules. These buttons could simply add or remove an option in the URL to the archive. This would be enough for package maintainers, as they could use the URL for recursive submodule cloning.
5 remaining items
Update README.md
tenbits commentedon Feb 23, 2022
That's why we still keep zip-ing the source code and including it to git. 21st century
crocket commentedon Feb 24, 2022
I think people should contribute to projects like gitea instead of begging microsoft for a functionality.
Big tech doesn't listen to people. It's also a good idea to move your repositories out of github.
mrl5 commentedon Mar 6, 2022
in case someone is looking for a workaround:
for me github action that creates draft release with customr artifact works like charm: https://github.com/mrl5/vulner/blob/d67baade397c650fde6edb7e183e9fa638b40a06/.github/workflows/draft-release.yaml
ahalekelly commentedon Mar 27, 2022
Here's my Github Action to do this:
https://github.com/ahalekelly/Dettlaff/blob/master/.github/workflows/nightly-release.yaml
PBfordev commentedon Apr 24, 2022
I understand why including submodules in the generated ZIP could be problematic. On the other hand, source in the ZIP without submodule sources is of little use, and as noted above, just confuses many people.
What I do not understand is why GitHub does not at least show a loud and clear warning before downloading a ZIP for a repository with submodules.
Was there an official GitHub concrete response to this problem, I could not find any and this Issue has been open for over 5 years?
dev-libs/gost-engine: fix build
andry81 commentedon Feb 24, 2023
I just want to notice that the git submodules does not support several git features as a builtin like sparse checkout or sparse recursion additionally to recursion flag in a command. You still must rely on some external tool and storage, for example, like vcstool to use alternative (and much more advanced) variant of external dependencies to checkout them. This brings alternative custom
.submodulesfile and requires to supersede the clone command.So as a result the archive command can not take out submodules correctly (no sparse support) and it's implementation actually never would be enough complete and applicaible.
Currently the vcstool project does not have a sparse checkout implemented, but it's fork has:
dirk-thomas/vcstool#218
https://github.com/dirk-thomas/vcstool/pull/219/files
sebres commentedon Feb 27, 2023
That all is mostly irrelevant by simplest downloading of archive for some branch on GH. But also if it it would be relevant for 0.01% of all cases, it'd work for 99.99% where a submodules must be included to archive one-to-one, without to take care about that "several git features".
At the moment it simply doesn't work for 100% of all repos with submodules.
build: 🔥 remove git modules
build: 🔥 removed git modules (#273)
Automate upload of release archives
Automate upload of release source archives
Automate upload of release source archives (#24)
Endermanbugzjfc commentedon Aug 23, 2025
+1 from Nixpkgs maintainer.