Save waiting-time/bandwidth and disk-space with init_submodules.py

Do you have several project repos where you have JUCE and other libraries as git submodules in each of them?
When you clone your projects on a new computer, does cloning with all the submodules take forever?
So here’s something that could be useful for you -

init_submodules.py builds on git’s relatively new --reference feature to only clone a submodule once, and have its other instances reference the same git objects, saving precious download time and disk space!

It requires a relatively new git version that supports --reference (feature is new from last year, macOS’s system git already has it).

Cheers, Yair

2 Likes

True, but over time as you update the submodules to new versions, the downloaded updates will still be duplicated unless using --reference.

I could add the --depth option to init_submodules.py though to enjoy using both options.

Have now added an option to the script to do --depth 1, so that now you do both together.

1 Like