[Bro-Dev] Git merge and submodules

Jonathan Siwek jsiwek at ncsa.illinois.edu
Thu Jan 13 08:29:48 PST 2011


> No idea what was going on there and where to wrong submodule info came from....

It's because the two branches that were merged had differing submodule "pointers" and when the merge occurs it just changes the pointers, not the actual content of your local repositories submodules, thus `git status` has to report a change in the submodules. 

> "git submodule --recursive update" seems to have solved the problem.

Yeah, I haven't strained myself too hard thinking about this but I think maybe this is a good solution for anyone that encounters this after doing branch merges because after the merge, submodule pointers should always be set to the most recent version between the two merging branches.  i.e. it's not possible that the `git submodule update` actually checked out an older version of the submodules.

On the other hand, for someone that's directly making changes to submodules, this would probably not be the command they want to run when they see similar things from `git status`.

- Jon


More information about the bro-dev mailing list