My usecase is:
I have a two branches of a repo containing submodules.
I want to set up auto-integrate of these two branches. But whenever there are submodule updates on both branches, my auto integrate script fails with conflicts on submodules. Is there way to ask git to ignore the changes in submodule pointers during the merge?
Or provide something like merge=ours
for the given submodules?
I've read this here.
I tried the merge strategies in the above page for submodule folder like this (but it only works for files)
submodule-name merge=ours
Even this is an old post, just commenting for lazy people like me :P
Basically, you get this issue if your submodule history is different from a branch that you want to merge.
Try this way, if might help you too.
As the submodules history is mismatched, try to match them by pulling/reverting/shifting to other branch and commit those submodule references, this worked for me. Hope it works for you too.