

The code has been tightened up to ensure it only does common ancestry discovery and nothing else. It should never recurse into submodules even when fetch.recursesubmodules configuration variable is set, nor it should trigger " gc". With Git 2.36 (Q2 2022), " git fetch -negotiate-only" ( man) is an internal command used by git push ( man) to figure out which part of our history is missing from the other side. (Merged by Junio C Hamano - gitster - in commit 792e22e, ) See commit 225e8bf, commit 6c656c3, commit 14c01bd () by Brandon Williams ( mbrandonw). This is done by passing the -dry-run flag to the child process which performs a push for a submodules when performing a dry-run.Īnd still in Git 2.12, you now havea " -recurse-submodules=only" option to push submodules out without pushing the top-level superproject. Teach push to respect the -dry-run option when configured to recursively push submodules 'on-demand'. This is a bug and not the intended behaviour of a dry-run. Instead all submodules which need to be pushed are actually pushed to their remotes while any updates for the superproject are performed as a dry-run. 2016 and lower/before) perform a dry-run when push is configured to push submodules Push run with -dry-run doesn't actually (Git 2.11 Dec. (Merged by Junio C Hamano - gitster - in commit 12cf113, ) See commit 0301c82, commit 1aa7365 () by Brandon Williams ( mbrandonw). Git push -dry-run -recurse-submodules=on-demand will actually work. So: git config push.recurseSubmodules on-demand You may override this configuration at time of push by specifying ' -recurse-submodules=check|on-demand|no'.

Time but it has no config file equivalent.įollowing the style of the corresponding parameter for git fetch, let's The -recurse-submodules command line parameter has existed for some (Merged by Junio C Hamano - gitster - in commit 5d35d72, ) push: add recurseSubmodules config option See commit d34141c, commit f5c7cd9 (), commit f5c7cd9 (), and commit b33a15b () by Mike Crowe ( mikecrowe). With git 2.7 (January 2016), a simple git push will be enough to push the parent repo. Changes to the submodule inside of another submodule will not be pushed. This option only works for one level of nesting. So you could push everything in one go with (from the parent repo) a: git push -recurse-submodules=on-demand If on-demand is used, all submodules that changed in the revisions to be pushed will be pushed.Otherwise the push will be aborted and exit with non-zero status. If check is used, it will be checked that all submodule commits that changed in the revisions to be pushed are available on a remote.Make sure all submodule commits used by the revisions to be pushed are available on a remote tracking branch.
GITKRAKEN PUSH TO MULTIPLE REMOTE PATCH
Probably done after this patch and the -on-demand option: recurse-submodules=:: " git push -recurse-submodules" learned to optionally look into the histories of submodules bound to the superproject and push them out. Note that since git1.7.11 ( Git 1.7.11.rc1 and release note, June 2012) mentions:
