How to prevent uncleaned submodules in git
You can use (git 1.7.7+):
git push --recurse-submodules=on-demand
I present it in a " Git push submodule " and it detects a modification to the submodule to push it first before pushing the main repo.
Please note that there are 2 options:
git push --recurse-submodules=check git push --recurse-submodules=on-demand
Make sure all submodule commits used by dragged revisions are available on the remote tracking branch.
git, it will check that all submodule commits that were changed in the versions to be pushed are available on at least one remote submodule.
If any commits are missing, the push will be canceled and exit with a non-zero status.
, all sub-modules that have changed in the versions to be clicked will be clicked.
If on-demand failed to push all the required changes, it will also be aborted and exited with a non-zero status.
source to share