It is easy to clone an entire project plus all its submodules:
git clone --recursive [email protected]:homer/powerplant.git
However, how do I create a clone that has all these submodules replaced by the HEADs of the individual sub-repositories themselves? Preferably in such a way that this can be repeated easy, as soon as something changes. The target should be a read-only "flat" version of the same overall code. No merging should be necessary.
If this is possible, it would solve my Launchpad problems where bzr can import only repositories without submodules.
If you want to start with submodules' files but not as git repos, simply do the following:
git clone --recursive [email protected]:homer/powerplant.git (insane repo name btw)git config --remove-section submodule.nameYou'll end up with what you want, submodule files in the working tree but submodules not initialized as such.
You could have used the newest git submodule deinit command, but it also removes submodule's files from the working tree.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With