Search code examples
gitgit-submodules

Git submodule : automatic merge


Is it possible, with git, to automaticaly make a merge inside a submodule only asking merge inside main module ? Is there a command / option to do that ?

Goal is, in main module, to be on branch1 with submodules on same branch1. When a merge command between branch1 and a remote branch is used within main module, that merge branch1 with remote branch within submodule too.


Solution

  • Shortly, no. You need to specify it for the submodules using git submodule update --remote --merge.

    You can see plenty of explanations on submodules in the official documentation here.