You checkout whatever repository you want.
Then you make all the changes that are required to make it all work in any submodule as needed. You don't commit in the submodules.
Make sure you have committed everything in your own repository and git diff
shows that there are only changes in your submodules and you "parent" repository is still clean.
git --no-pager diff --no-color --submodule=diff > patch.diff
Then you can add patch.diff
to you parent git repository which now contains all the changes
Applying a patch is super easy for a new checkout:
- (you may have done this already):
git clone --recurse-submodules
- applying the patch:
patch -p < patch.diff