git merge --squash --strategy-option theirs anotherbranch
...
<list of files>
CONFLICT (submodule): Merge conflict in test/test_lib
...
Squash commit -- not updating HEAD
Automatic merge failed; fix conflicts and then commit the result.
git merge --abort
fatal: There is no merge to abort (MERGE_HEAD missing).
git commit -m "merge"
error: Committing is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
根本原因是子模块test_lib。 如果你看到这样的消息
CONFLICT (submodule): Merge conflict in test/test_lib
用途:
git add test_lib
git commit -m "merge"