Zipping all relevant files in a git repo

How to make a zip copy of all git repo files without garbage

Adding all existing submodules to a git repo

You have a git repo which contains sub-directories which are git repos themselves and now you want them to become submodules. Here's a quick automatic way to add them all.