Search code examples
gitgithubgit-submodules

GitHub zip download with empty submodule folder


I have a repo on GitHub with a submodule. The submodule directory is contained

  • in the root directory of the repo directly on github.com
  • and also in the zip that can be downloaded from github.com.

If I click on the directory on github.com, there is the expected content (of the submodule). However, in the zip, the submodule directory is empty.

How can I fix this?

It is important that people who download the root module, automatically get all the submodule content in order to be able to use it. Thank you!


Solution

  • As I mentioned before, a submodule is not included in a GitHub archive (tarball/zipfile).

    You need to add to your GitHub release an artifact representing the full cloned repository (like git-archive-all.sh).