The git-push
documentation is pretty clear on the four options (using --recurse-submodules
) for push
's behavior when submodules are present:
check
: Make sure submodule commits needed by the parent have been pushed; abort push if they have noton-demand
: Push all needed submodule commits before pushing parent commits (and fail if any fail)only
: Push only submodules; do not push the parentno
(or--no-recurse-submodules
): Do not push submodules.
But what is the default? If no --recurse-submodules
option is present, no --no-recurse-submodules
option is present, and no push.recurseSubmodules
configuration value is set, what happens? And is it the same for all Git versions?
Appendix
The documentation contains a hint that the default is no
:
A value of no or using --no-recurse-submodules can be used to override the push.recurseSubmodules configuration variable when no submodule recursion is required. (emphasis added)
So if the no
option is needed only when push.recurseSubmodules
is set, this implies that when push.recurseSubmodules
is unset, no
is the default behavior. Is it?