I have a repository, let’s call it PARENT, which includes many submodules (submodules name: A, B, C, …). the PARENT has different branches and each branch has different submodules. I have to merge different branches into master branch after each successful deployment. I use the following commands
$ git clone --recurse-submodules https://.../../PARENT <PARENT repository URL> $ cd PARENT $ git merge -X theirs origin/foo <master is default branch and foo is another branch> Failed to merge submodule A (commits don't follow merge-base) Auto-merging A CONFLICT (submodule): Merge conflict in A Failed to merge submodule B (commits not present) Auto-merging B CONFLICT (submodule): Merge conflict in B Auto-merging .gitmodules Automatic merge failed; fix conflicts and then commit the result.
the .gitmodules file merge without an issue, but the ref. number for submodules doesn’t merge.
How can I solve this?