I am working with git a repository that has submodules.
How can I checkout to a previous commit and update the submodules (only those that need rollback update) ? The intent of this is to save time on git submodule update --init --recursive
.
Why is git submodule update not automatic on git checkout? does not answer the particular part of the question, which is to update the submodules that are not up to date with the previous commit and not to update the submodules that are up to date with the previous commit. git submodule update --init --recursive
clones all the submodules and it is not the expected result.